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

aws_datasync_agent with activation_key is not idempotent #19947

Closed
limitusus opened this issue Jun 24, 2021 · 3 comments · Fixed by #32546
Closed

aws_datasync_agent with activation_key is not idempotent #19947

limitusus opened this issue Jun 24, 2021 · 3 comments · Fixed by #32546
Labels
bug Addresses a defect in current functionality. service/datasync Issues and PRs that pertain to the datasync service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Milestone

Comments

@limitusus
Copy link

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 v0.14.11

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

Affected Resource(s)

  • aws_datasync_agent

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_datasync_agent" "nfs" {
  name = "nfs"

  activation_key        = "AAAAA-BBBBB-CCCCC-DDDDD-EEEEE"
  security_group_arns   = [data.aws_security_group.default.arn]
  subnet_arns           = [data.aws_subnet.datasync_nfs.arn]
  vpc_endpoint_id       = aws_vpc_endpoint.datasync.id
}

Debug Output

Panic Output

N/A

Expected Behavior

After terraform apply, and then terraform plan, no diff should appear.

Actual Behavior

terraform apply itself succeeds, however a drift with replacement is detected as follows:

  # aws_datasync_agent.nfs must be replaced
-/+ resource "aws_datasync_agent" "nfs" {
      ~ arn                   = "arn:aws:datasync:ap-northeast-1:123456789012:agent/agent-01234567890123456" -> (known after apply)
      ~ id                    = "arn:aws:datasync:ap-northeast-1:123456789012:agent/agent-01234567890123456" -> (known after apply)
      + ip_address            = (known after apply)
        name                  = "nfs"
      - private_link_endpoint = "10.0.4.125" -> null # forces replacement
        # (5 unchanged attributes hidden)
    }

Steps to Reproduce

  1. Put aws_datasync_agent with activation_key, not ip_address
  2. terraform apply
  3. terraform plan

Important Factoids

References

btw resource name in https://github.com/hashicorp/terraform-provider-aws/pull/16207/files#diff-f934b36f3fe5b685db4381f7c9f77e790e65db91e86e7c8423cab27d050eb831 should be fixed from aws_datasync_option to aws_datasync_agent

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/datasync Issues and PRs that pertain to the datasync service. labels Jun 24, 2021
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 28, 2021
@github-actions
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 Jun 18, 2023
@github-actions github-actions bot added this to the v5.9.0 milestone Jul 18, 2023
@github-actions
Copy link

This functionality has been released in v5.9.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. Thank you!

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2023
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. service/datasync Issues and PRs that pertain to the datasync service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants