-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcircle.yml
41 lines (38 loc) · 1.11 KB
/
circle.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
machine:
timezone: Asia/Tokyo
environment:
TERRAFORM_VERSION: 0.6.14
PATH: ~/.terraform:$PATH
AWS_DEFAULT_REGION: ap-northeast-1
ruby:
version: 2.2.3
dependencies:
cache_directories:
- |
~/.terraform
pre:
- |
mkdir -p ~/.terraform
if [ -z "$(ls -A ~/.terraform)" ]; then
cd ~/.terraform
curl -LO https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip
rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip
fi
test:
pre:
- |
terraform remote config -backend=S3 -backend-config="bucket=terraform-tfstate-zabbix3" -backend-config="key=terraform-tfstate-zabbix3"
terraform remote pull
override:
- |
terraform plan
deployment:
production:
branch: release
commands:
- |
terraform remote config -backend=S3 -backend-config="bucket=terraform-tfstate-zabbix3" -backend-config="key=terraform-tfstate-zabbix3"
terraform remote pull
terraform apply
terraform remote push