Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bluegreen deployment changes for ECS #11885

Merged
merged 1 commit into from
Mar 30, 2020
Merged

Fix bluegreen deployment changes for ECS #11885

merged 1 commit into from
Mar 30, 2020

Conversation

ImFlog
Copy link
Contributor

@ImFlog ImFlog commented Feb 4, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #7128

Release note for CHANGELOG:

BUG FIXES:
resource/aws_codedeploy_deployment_group: Fix blue_green_deployment_config updates for ECS [#7128]

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSCodeDeployDeploymentGroup*'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCodeDeployDeploymentGroup* -timeout 120m
=== RUN   TestAccAWSCodeDeployDeploymentGroup_basic
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_basic
=== RUN   TestAccAWSCodeDeployDeploymentGroup_basic_tagSet
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_basic_tagSet
=== RUN   TestAccAWSCodeDeployDeploymentGroup_onPremiseTag
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_onPremiseTag
=== RUN   TestAccAWSCodeDeployDeploymentGroup_disappears
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_disappears
=== RUN   TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic
=== RUN   TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple
=== RUN   TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create
=== RUN   TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update
=== RUN   TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete
=== RUN   TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable
=== RUN   TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create
=== RUN   TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update
=== RUN   TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete
=== RUN   TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable
=== RUN   TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default
=== RUN   TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create
=== RUN   TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update
=== RUN   TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete
=== RUN   TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create
=== RUN   TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update
=== RUN   TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete
=== RUN   TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create
=== RUN   TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update
=== RUN   TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete
=== RUN   TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_create
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_create
=== RUN   TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_update
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_update
=== RUN   TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create
=== RUN   TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg
=== RUN   TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update
=== RUN   TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete
=== RUN   TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete
=== RUN   TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen
=== PAUSE TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen
=== CONT  TestAccAWSCodeDeployDeploymentGroup_basic
=== CONT  TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_update
=== CONT  TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update
=== CONT  TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete
=== CONT  TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create
=== CONT  TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete
=== CONT  TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update
=== CONT  TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_create
=== CONT  TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete
=== CONT  TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen
=== CONT  TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create
=== CONT  TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete
=== CONT  TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update
=== CONT  TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create
=== CONT  TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable
=== CONT  TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create
=== CONT  TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update
=== CONT  TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable
=== CONT  TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete
=== CONT  TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default (50.23s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete (67.11s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete (67.23s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create (67.54s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable (67.76s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update (68.10s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete (68.25s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update (70.15s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_onPremiseTag
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete (70.39s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_disappears
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create (74.01s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_basic_tagSet
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete (79.31s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create (79.50s)
=== CONT  TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create (82.92s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_update (83.51s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update (83.59s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_create (84.43s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update (84.98s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable (86.60s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic (95.24s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_onPremiseTag (40.99s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_disappears (41.95s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete (62.46s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update (58.47s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create (62.39s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update (62.78s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete (63.55s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic (68.78s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple (69.30s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic_tagSet (75.84s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create (199.27s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg (210.17s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen (407.67s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       409.224s

@ImFlog ImFlog requested a review from a team February 4, 2020 17:15
@ghost ghost added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/codedeploy tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Feb 4, 2020
@rmax
Copy link

rmax commented Feb 6, 2020

Awesome!

@bflad bflad added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 30, 2020
@bflad bflad added this to the v2.56.0 milestone Mar 30, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @ImFlog 🚀

Verified new testing on master fails:

    TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen: testing.go:654: Step 1 error: errors during apply:

        Error: Error updating CodeDeploy deployment group: InvalidAutoScalingGroupException: For ECS deployment group, autoScalingGroups can not be specified

Then fix works as expected, output from acceptance testing:

--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create (44.76s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete (134.22s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable (49.17s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update (66.24s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create (33.51s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete (46.52s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable (38.05s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update (31.32s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic (77.12s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic_tagSet (78.35s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete (30.40s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create (133.17s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete (43.16s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update (28.42s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg (141.84s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create (24.48s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default (50.04s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete (69.77s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update (82.09s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_disappears (26.67s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen (313.78s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_inPlaceDeploymentWithTrafficControl_create (25.49s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_inPlaceDeploymentWithTrafficControl_update (48.17s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create (46.85s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete (30.40s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create (28.59s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete (32.31s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update (32.88s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update (38.29s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_onPremiseTag (30.71s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic (32.39s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple (45.11s)

@bflad bflad merged commit 106de98 into hashicorp:master Mar 30, 2020
bflad added a commit that referenced this pull request Mar 30, 2020
@ImFlog ImFlog deleted the fix_bluegreen_ecs branch March 30, 2020 15:51
@ghost
Copy link

ghost commented Apr 3, 2020

This has been released in version 2.56.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Apr 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

1 similar comment
@ghost
Copy link

ghost commented Apr 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
3 participants