-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Bug]: aws_datasync_agent can't be imported cleanly #33458
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
This issue has been resolved with #35150, and will be released in import {
to = aws_datasync_agent.example
id = "arn:aws:datasync:us-east-1:123456789012:agent/agent-12345678901234567"
}
resource "aws_datasync_agent" "example" {
# activation_key no longer required here!
name = "example"
} |
This functionality has been released in v5.32.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! |
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. |
Terraform Core Version
1.5.5
AWS Provider Version
5.16.2
Affected Resource(s)
resource: aws_datasync_agent
Expected Behavior
AWS Terraform documentation clearly states that: One of activation_key or ip_address must be provided for resource creation (agent activation). Neither is required for resource import.
When the datasync agent is created through the AWS console with an activation_key. I should be able to import that resource AND use the aws_datasync_agent resource WITHOUT providing activation_key or ip_address.
The activation key is short lived so shouldn't be a cause to force replace.
Actual Behavior
Datasync agent is imported with null for activation key.
Then when we don't have at least one of activation_key/ip_address as a resource argument, the Terraform plan fails with "Invalid combination of arguments".
activation_key value in the state file needs to be updated with the correct activation key value (taken from the aws console), then added to the resource block code as an argument to be successful with no replacement of resource.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
terraform import aws_datasync_agent.example arn:aws:datasync:us-east-1:123456789012:agent/agent-12345678901234567
main.tf:
resource "aws_datasync_agent" "example" {
name = "example"
}
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: