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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code-Deploy modifying resource in-place resulting in Error updating CodeDeploy deployment group: DeploymentGroupDoesNotExistException: #20408

Open
sarvajit-sankar-comprinno opened this issue Aug 2, 2021 · 1 comment
Labels
bug Addresses a defect in current functionality. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@sarvajit-sankar-comprinno

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v1.0.3
on linux_amd64

  • provider registry.terraform.io/hashicorp/aws v3.51.0

Affected Resource(s)

  • aws_codedeploy_deployment_group
  • aws_codedeploy_app

Terraform Configuration Files

resource "aws_codedeploy_app" "app1" {
  compute_platform = "Server"
  name             = "app1"
}

resource "aws_codedeploy_app" "app2" {
  compute_platform = "Server"
  name             = "app2"
}

For 1st Terraform apply which is successful:

resource "aws_codedeploy_deployment_group" "g1" {
  app_name              = aws_codedeploy_app.app1.name
  deployment_group_name = "g1"
}

resource "aws_codedeploy_deployment_group" "g2" {
  app_name              = aws_codedeploy_app.app1.name
  deployment_group_name = "g2"
}

For 2nd Terraform apply, changes are as follows:
resource "aws_codedeploy_deployment_group" "g1" {
  app_name              = aws_codedeploy_app.app1.name
  deployment_group_name = "g1"
}

resource "aws_codedeploy_deployment_group" "g2" {
  app_name              = aws_codedeploy_app.app2.name
  deployment_group_name = "g2"
}

Debug Output

Panic Output

Expected Behavior

After the 2nd Terraform apply, it should've destroyed previously created Deployment group belonging to "app1", and then created a new deployment group in "app2"

Actual Behavior

Terraform tried to modify the same deployment group, and errored as follows:

Error: Error updating CodeDeploy deployment group: DeploymentGroupDoesNotExistException: No Deployment Group found for name: g2

Steps to Reproduce

  1. terraform apply with 1st Terraform apply configurations
  2. terraform apply with 2nd Terraform apply configurations

Important Factoids

References

  • #0000
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/codedeploy labels Aug 2, 2021
@breathingdust breathingdust added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 27, 2021
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

3 participants