[Bug]: Unable to use import block for datasync_location_nfs #33381
Labels
bug
Addresses a defect in current functionality.
service/datasync
Issues and PRs that pertain to the datasync service.
Milestone
Terraform Core Version
1.5.2,1.5.7
AWS Provider Version
5.15.0,5.16.0
Affected Resource(s)
Expected Behavior
NFS location should be imported successfully and added to state without an errors. Server_hostname should be populated from existing task location in AWS.
Actual Behavior
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
terraform plan -generate-config-out=generated.tf
Debug Output
N/A
Panic Output
N/A
Important Factoids
I am able to import the resource successfully using "state surgery" by following this workflow:
terraform plan
and see "No changes. Your infrastructure matches the configuration."References
It appears the import command doesn't know how to read the hostname or IP after nfs://. Below is the response from AWS CLI, you will see that server_hostname is not a valid output. Should a fix involve capturing the hostname from LocationUri?
Would you like to implement a fix?
None
EDIT
The same issue occurs when importing datasync_location_efs.
"efs_file_system_arn": null
exists in the state file for an imported DataSync EFS location. This issue probably spreads to other datasync sources as well but I am unable to test all.The text was updated successfully, but these errors were encountered: