3
3
- docker
4
4
environment :
5
5
TF_IMG : unifio/terraform:0.7.5
6
- TF_CMD : docker run -v /home/ubuntu/.aws:/home/user/.aws -e AWS_DEFAULT_REGION=us-east-1 -e LOCAL_USER_ID=1000 --rm
6
+ TF_CMD : docker run -v /home/ubuntu/.aws:/home/user/.aws -e AWS_DEFAULT_REGION=us-east-1 -e LOCAL_USER_ID=1000
7
7
test :
8
8
pre :
9
9
- docker pull $TF_IMG
21
21
- ' echo -e "vpg_vpc_attach = \"1\"\n" | tee -a examples/full_stack.tfvars'
22
22
- ' echo -e "rt_vgw_prop = \"1\"\n" | tee -a examples/full_stack.tfvars'
23
23
- " bundle exec rake apply['full_stack',${TF_IMG},\" ${TF_CMD}\" ,'full_stack.tfvars']"
24
+ # Testing peering connection
25
+ - ' export LAN_RT_IDS=`bundle exec rake output["basic",${TF_IMG},"${TF_CMD}","lan_rt_ids"]` && echo -e "owner_rt_lan_id = \"${LAN_RT_IDS}\"" | tee -a examples/peering.tfvars'
26
+ - ' export VPC_ID=`bundle exec rake output["basic",${TF_IMG},"${TF_CMD}","vpc_id"]` && echo -e "owner_vpc_id = \"${VPC_ID}\"" | tee -a examples/peering.tfvars'
27
+ - ' export LAN_RT_IDS=`bundle exec rake output["full_stack",${TF_IMG},"${TF_CMD}","lan_rt_ids"]` && echo -e "peer_rt_lan_id = \"${LAN_RT_IDS}\"" | tee -a examples/peering.tfvars'
28
+ - ' export VPC_ID=`bundle exec rake output["full_stack",${TF_IMG},"${TF_CMD}","vpc_id"]` && echo -e "peer_vpc_id = \"${VPC_ID}\"" | tee -a examples/peering.tfvars'
29
+ - ' echo -e "peer_owner_id = \"${PEER_OWNER_ID}\"\n" | tee -a examples/peering.tfvars'
30
+ - " bundle exec rake get['peering',${TF_IMG},\" ${TF_CMD}\" ]"
31
+ - " bundle exec rake apply['peering',${TF_IMG},\" ${TF_CMD}\" ,'peering.tfvars']"
24
32
# Test stack clean-up
25
- - " bundle exec rake destroy['basic ',${TF_IMG},\" ${TF_CMD}\" ,'basic .tfvars']"
33
+ - " bundle exec rake destroy['peering ',${TF_IMG},\" ${TF_CMD}\" ,'peering .tfvars']"
26
34
- " bundle exec rake destroy['full_stack',${TF_IMG},\" ${TF_CMD}\" ,'full_stack.tfvars']"
35
+ - " bundle exec rake destroy['basic',${TF_IMG},\" ${TF_CMD}\" ,'basic.tfvars']"
36
+
0 commit comments