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

Addresses a number of issues with blocks in aws_codedeploy_deployment_group #11648

Merged
merged 5 commits into from
Feb 4, 2020

Conversation

gdavison
Copy link
Contributor

Unexpected behaviour occurs with some block attributes of aws_codedeploy_deployment_group when blocks are updated or deleted.

This PR now:

  • Actually deletes load_balancer_info via the API and state when the block is removed from the resource configuration. This would also previously prevent setting values on load_balancer_info if it had been removed from the configuration. See aws_codedeploy_deployment_group issues with load_balancer_info #10836
  • Now resets deployment_style to defaults if it is removed from configuration. Previously, this would do nothing to the resource in AWS.

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 #10836

Release note for CHANGELOG:

resource/aws_codedeploy_deployment_group: Fixes unexpected behaviour when removing block attributes

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSCodeDeployDeploymentGroup_'

--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default (47.18s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create (49.10s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete (49.55s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete (53.70s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple (53.85s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete (56.37s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create (58.31s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update (61.30s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete (62.70s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_create (62.74s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update (62.94s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable (62.96s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create (65.49s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic (69.96s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update (71.69s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete (73.06s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_disappears (38.72s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable (87.97s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update (87.97s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_update (89.99s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete (49.61s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create (43.70s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create (47.37s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_onPremiseTag (53.27s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update (44.53s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic (64.19s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic_tagSet (53.30s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update (61.17s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete (64.07s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create (137.16s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg (177.98s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen (308.25s)

@gdavison gdavison requested a review from a team January 17, 2020 22:29
@ghost ghost added size/L Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/codedeploy tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jan 17, 2020
@aeschright aeschright removed the needs-triage Waiting for first response or review from a maintainer. label Jan 22, 2020
@@ -42,6 +42,9 @@ func TestAccAWSCodeDeployDeploymentGroup_basic(t *testing.T) {
"aws_codedeploy_deployment_group.foo", "service_role_arn",
regexp.MustCompile("arn:aws:iam::[0-9]{12}:role/foo_role_.*")),

resource.TestCheckResourceAttr(
"aws_codedeploy_deployment_group.foo", "blue_green_deployment_config.#", "0"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you're in here, you can clean up those foo bits to be our standard test naming.

@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Jan 25, 2020
Copy link
Contributor

@aeschright aeschright left a comment

Choose a reason for hiding this comment

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

👍

--- PASS: TestAccAWSCodeDeployDeploymentGroup_disappears (28.53s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_update (40.55s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete (41.86s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete (43.50s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update (43.85s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete (47.80s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_create (48.43s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete (57.04s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update (57.72s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete (58.83s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete (58.88s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple (60.46s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic (62.00s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create (66.91s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update (67.40s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update (46.79s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable (75.66s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create (42.97s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update (40.18s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic (88.18s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default (45.64s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create (47.15s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable (51.68s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_onPremiseTag (54.50s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update (39.90s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create (39.73s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create (41.48s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete (39.94s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic_tagSet (56.12s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create (132.81s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg (148.93s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_ECS_BlueGreen (280.61s)

@gdavison gdavison merged commit 326b393 into master Feb 4, 2020
gdavison added a commit that referenced this pull request Feb 4, 2020
@ghost
Copy link

ghost commented Mar 27, 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 Mar 27, 2020
@ewbankkit ewbankkit deleted the b-codedeploy-load-balancer branch September 12, 2021 21:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. size/XXL 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
Development

Successfully merging this pull request may close these issues.

aws_codedeploy_deployment_group issues with load_balancer_info
2 participants