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

codedeploy_deployment_group: Include autoscaling groups when updating blue green config. #5827

Merged
merged 6 commits into from
Sep 28, 2018

Conversation

niclic
Copy link
Contributor

@niclic niclic commented Sep 10, 2018

Fixes #2233

Changes proposed in this pull request:

  • Include autoscaling_groups in the UpdateDeploymentGroup request if blue_green_deployment_config has changed.

When updating blue_green_deployment_config with the green_fleet_provisioning_option of COPY_AUTO_SCALING_GROUP, but there are no changes to autoscaling_groups, then the UpdateDeploymentGroup request sent to AWS does not include the list of existing autoScalingGroups and the following error is returned:

InvalidBlueGreenDeploymentConfigurationException: Exactly one AutoScaling group must be specifed when selecting the COPY_AUTO_SCALING_GROUP green fleet provisioning option.

The commit of interest is this one.

I thought this problem might also affect load_balancer_info when using a deployment_option of WITH_TRAFFIC_CONTROL, but it does not appear to.

I added some additional test cases, and also extracted out common retry error handling into a separate function.

@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Sep 10, 2018
@niclic
Copy link
Contributor Author

niclic commented Sep 10, 2018

Build says:

gofmt needs running on the following files:
./aws/resource_aws_codedeploy_deployment_group_test.go

And yet, it has been run (can't run tests without running make fmt). Even now, I run gofmt but no changes are made to this file. No pending changes or commits.

  - needed to upgrade to go version 1.11
@niclic
Copy link
Contributor Author

niclic commented Sep 10, 2018

After reading the docs, I needed to bump my go version to 1.11. ;)

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.

LGTM, thanks @niclic! 🚀

31 tests passed (all tests)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update (21.42s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete (23.82s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create (25.36s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable (28.20s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete (29.31s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete (29.52s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update (31.64s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create (32.29s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_disappears (32.70s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic_tagSet (35.97s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable (39.98s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_onPremiseTag (40.88s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete (21.33s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create (24.71s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_basic (50.57s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_create (21.16s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create (57.76s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete (22.39s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update (26.43s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete (21.06s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete (33.45s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple (61.90s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_control_update (33.99s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update (66.44s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default (66.96s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update (74.00s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic (85.65s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update (60.85s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create (104.40s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update_with_asg (133.67s)
--- PASS: TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create (185.39s)

@bflad bflad added this to the v1.39.0 milestone Sep 28, 2018
@bflad bflad merged commit f743a20 into hashicorp:master Sep 28, 2018
bflad added a commit that referenced this pull request Sep 28, 2018
@ghost
Copy link

ghost commented Oct 3, 2018

This has been released in version 1.39.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "aws" {
	version = "~> 1.39.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 3, 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 3, 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/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_codedeploy_deployment_group green_fleet_provisioning_option COPY_AUTO_SCALING_GROUP got error
2 participants