-
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]: Terraform does not import DataSync S3 location with a required argument #31678
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
@markoeremija This should be fixed by #36072 which went into v5.42.0 of the provider. Please give it a try and close this ticket once verified. Thanks. |
@acwwat Thanks for letting me know it's fixed, I no longer have access to the codebase where I found the bug, but I'll close it anyway. |
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
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.4.2
AWS Provider Version
4.67.0
Affected Resource(s)
aws_datasync_location_s3
Expected Behavior
When importing an existing AWS DataSync S3 location to the terraform state, it would be expected to import also the argument marked as required in the documentation, i.e.,
s3_bucket_arn
.Actual Behavior
The
terrform import
command completes successfully (based on the example from the documentation):The subsequent
terraform plan
shows that terraform wants to recreate everything (including the DataSync task using this source, omitted for brevity) because thes3_bucket_arn
argument was added:The resource definition in the module is as follows:
Using
terraform state show module.datasync.aws_datasync_location_s3.source
gives the following output:As can be seen from the
terraform state show
output, there is nos3_bucket_arn
argument. Currently, the workaround is to uselifecycle
block to ignore changes to thes3_bucket_arn
argument:This approach solves the issue with terraform wanting to recreate everything.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
terraform plan
.s3_bucket_arn
is missing after the import.Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: