Last active
May 25, 2017 15:50
-
-
Save dewoods/b0eac224172985b410ee382ec6d11012 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"groups": [], | |
"resources": [ | |
{ | |
"name": "terraform", | |
"type": "terraform", | |
"source": { | |
"delete_on_failure": true, | |
"env": { | |
"AWS_ACCESS_KEY_ID": "{{ cloud_credential.key_id }}", | |
"AWS_SECRET_ACCESS_KEY": "{{ cloud_credential.access_key }}" | |
}, | |
"storage": { | |
"access_key_id": "{{ cloud_credential.key_id }}", | |
"bucket": "tackle.io-terraform-state", | |
"bucket_path": "concourse-test/", | |
"region_name": "us-west-2", | |
"secret_access_key": "{{ cloud_credential.access_key }}" | |
}, | |
"terraform_source": "https://s3.amazonaws.com/tackle.io-misc/simple-tackle-deploy.zip", | |
"vars": { | |
"instance_access_key": "{{ cloud_credential.key_id }}", | |
"instance_secret_key": "{{ cloud_credential.access_key }}", | |
"tag_name": "concourse" | |
} | |
}, | |
"check_every": "", | |
"tags": null | |
} | |
], | |
"resource_types": [ | |
{ | |
"name": "terraform", | |
"type": "docker-image", | |
"source": { | |
"repository": "ljfranklin/terraform-resource" | |
}, | |
"tags": null | |
} | |
], | |
"jobs": [ | |
{ | |
"name": "terraform-plan", | |
"plan": [ | |
{ | |
"put": "terraform", | |
"params": { | |
"env_name": "{{ instance.id }}", | |
"plan_only": true | |
} | |
} | |
] | |
}, | |
{ | |
"name": "terraform-apply", | |
"plan": [ | |
{ | |
"get": "terraform", | |
"passed": [ | |
"terraform-plan" | |
], | |
"trigger": true | |
}, | |
{ | |
"put": "terraform", | |
"params": { | |
"delete_on_failure": true, | |
"env_name": "{{ instance.id }}", | |
"plan_run": true | |
} | |
} | |
] | |
}, | |
{ | |
"name": "terraform-destroy", | |
"plan": [ | |
{ | |
"get": "terraform", | |
"passed": [ | |
"terraform-apply" | |
] | |
}, | |
{ | |
"put": "terraform", | |
"params": { | |
"action": "destroy", | |
"env_name": "{{ instance.id }}" | |
}, | |
"get_params": { | |
"action": "destroy" | |
} | |
} | |
] | |
}, | |
{ | |
"name": "terraform-output", | |
"plan": [ | |
{ | |
"get": "terraform", | |
"passed": [ | |
"terraform-apply" | |
] | |
}, | |
{ | |
"task": "show-outputs", | |
"config": { | |
"platform": "linux", | |
"image_resource": { | |
"type": "docker-image", | |
"source": { | |
"repository": "ljfranklin/terraform-resource" | |
} | |
}, | |
"run": { | |
"path": "/bin/sh", | |
"args": [ | |
"-c", | |
"echo \"name: $(cat terraform/name)\"\necho \"$(cat terraform/metadata)\"\n" | |
], | |
"dir": "" | |
}, | |
"inputs": [ | |
{ | |
"name": "terraform" | |
} | |
] | |
} | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment