forked from ExpediaGroup/apiary-federation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hive-site.tf
28 lines (28 loc) · 845 Bytes
/
hive-site.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
data "template_file" "hive_site_xml" {
template = <<EOF
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>apiary.path.replacement.enabled</name>
<value>true</value>
</property>
%{for alluxio_endpoint in var.alluxio_endpoints}
%{for s3_bucket in split(",", alluxio_endpoint.s3_buckets)}
<property>
<name>apiary.path.replacement.regex.alluxio-${s3_bucket}</name>
<value>^(s3[an]?://)${s3_bucket}/.*$</value>
</property>
<property>
<name>apiary.path.replacement.value.alluxio-${s3_bucket}</name>
<value>${alluxio_endpoint.root_url}</value>
</property>
<property>
<name>apiary.path.replacement.capturegroups.alluxio-${s3_bucket}</name>
<value>1</value>
</property>
%{endfor}
%{endfor}
</configuration>
EOF
}