-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinterpolate.yml
43 lines (41 loc) · 1.66 KB
/
interpolate.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
platform: linux
image_resource:
type: docker-image
source:
repository: hairyhenderson/gomplate
tag: alpine
inputs:
- name: terraform-output
# - This must be an initialized git repository.
# - Note that any changes present in this input
# will be committed along with the file copied in
# by this task.
- name: config
# - This is the input folder containing the file to be committed.
# Typically, this will from some other task
# with an output that needs to be persisted.
outputs:
- name: interpolated-config
params:
ENV_NAME:
PIVNET_API_TOKEN:
OM_USERNAME:
OM_PASSWORD:
OM_DECRYPTION_PASSPHRASE:
CLOUD_CONTROLLER_ENCRYPT_KEY:
MYSQL_EMAIL:
CREDHUB_KEY_ENCRYPTION_PASSWORD:
run:
path: /bin/sh
args:
- -c
- |
set -eu
mkdir -p interpolated-config/$ENV_NAME/config
mkdir -p interpolated-config/$ENV_NAME/env
mkdir -p interpolated-config/$ENV_NAME/tf
/bin/gomplate --input-dir config/$ENV_NAME/tf -d data=file://$(pwd)/terraform-output/metadata?type=application/json --output-dir interpolated-config/$ENV_NAME/tf --verbose
/bin/gomplate -i $'aws_access_key: {{env.Getenv "AWS_ACCESS_KEY" }} \naws_secret_key: {{env.Getenv "AWS_SECRET_KEY" }}' -o interpolated-config/$ENV_NAME/config/opsman-vars.yml --verbose
/bin/gomplate --input-dir config/$ENV_NAME/config -d data=file://$(pwd)/terraform-output/metadata?type=application/json --output-dir interpolated-config/$ENV_NAME/config --verbose
/bin/gomplate -f config/$ENV_NAME/env/env.yml -d data=file://$(pwd)/terraform-output/metadata?type=application/json -o interpolated-config/$ENV_NAME/env/env.yml --verbose