Refactor ccp_create using anchor
@@ -706,12 +706,7 @@ jobs:
- get: centos-gpdb-dev-6
- put: terraform
params:
- action: create
- delete_on_failure: true
- generate_random_name: true
- terraform_source: ccp_src/aws/
- vars:
- aws_instance-node-instance_type: t2.medium
+ <<: *ccp_create_params
- task: gen_cluster
file: ccp_src/ci/tasks/gen_cluster.yml
on_failure:
@@ -1213,12 +1208,7 @@ jobs:
- get: centos-gpdb-dev-6
- put: terraform
params:
- action: create
- delete_on_failure: true
- generate_random_name: true
- terraform_source: ccp_src/aws/
- vars:
- aws_instance-node-instance_type: t2.medium
+ <<: *ccp_create_params
- task: gen_cluster
file: ccp_src/ci/tasks/gen_cluster.yml
on_failure:
@@ -1457,6 +1447,14 @@ jobs:
## reusable anchors
## ======================================================================
+ccp_create_params_anchor: &ccp_create_params
+ action: create
+ delete_on_failure: true
+ generate_random_name: true
+ terraform_source: ccp_src/aws/
+ vars:
+ aws_instance-node-instance_type: t2.medium
+
ccp_destroy_anchor: &ccp_destroy
put: terraform
params:
@@ -1464,7 +1462,7 @@ ccp_destroy_anchor: &ccp_destroy
env_name_file: terraform/name
terraform_source: ccp_src/aws/
vars:
- aws_instance-node-instance_type: t2.micro
+ aws_instance-node-instance_type: t2.micro #t2.micro is ignored in destroy, but aws_instance-node-instance_type is required.
get_params:
action: destroy
