-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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_location_fsx_ontap_file_system: fix missing fields in smb #33641
aws_datasync_location_fsx_ontap_file_system: fix missing fields in smb #33641
Conversation
Community NoteVoting for Prioritization
For Submitters
|
d446afa
to
165cc9d
Compare
% make testacc TESTARGS='-run=TestAccDataSyncLocationFSxONTAPFileSystem_basic\|TestAccDataSyncLocationFSxONTAPFileSystem_smb' PKG=datasync ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/datasync/... -v -count 1 -parallel 20 -run=TestAccDataSyncLocationFSxONTAPFileSystem_basic\|TestAccDataSyncLocationFSxONTAPFileSystem_smb -timeout 360m === RUN TestAccDataSyncLocationFSxONTAPFileSystem_basic === PAUSE TestAccDataSyncLocationFSxONTAPFileSystem_basic === RUN TestAccDataSyncLocationFSxONTAPFileSystem_smb === PAUSE TestAccDataSyncLocationFSxONTAPFileSystem_smb === CONT TestAccDataSyncLocationFSxONTAPFileSystem_basic === CONT TestAccDataSyncLocationFSxONTAPFileSystem_smb location_fsx_ontap_file_system_test.go:103: Step 1/2 error: Error running apply: exit status 1 Error: creating DataSync Location FSx for NetApp ONTAP File System: InvalidParameter: 2 validation error(s) found. - missing required field, CreateLocationFsxOntapInput.Protocol.SMB.Password. - missing required field, CreateLocationFsxOntapInput.Protocol.SMB.User. with aws_datasync_location_fsx_ontap_file_system.test, on terraform_plugin_test.tf line 72, in resource "aws_datasync_location_fsx_ontap_file_system" "test": 72: resource "aws_datasync_location_fsx_ontap_file_system" "test" { --- PASS: TestAccDataSyncLocationFSxONTAPFileSystem_basic (2365.08s) --- FAIL: TestAccDataSyncLocationFSxONTAPFileSystem_smb (2408.72s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/datasync 2414.085s FAIL make: *** [testacc] Error 1
% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccDataSyncLocationFSxONTAPFileSystem_smb' PKG=datasync ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/datasync/... -v -count 1 -parallel 20 -run=TestAccDataSyncLocationFSxONTAPFileSystem_smb -timeout 720m === RUN TestAccDataSyncLocationFSxONTAPFileSystem_smb === PAUSE TestAccDataSyncLocationFSxONTAPFileSystem_smb === CONT TestAccDataSyncLocationFSxONTAPFileSystem_smb location_fsx_ontap_file_system_test.go:106: Step 1/2 error: Check failed: 1 error occurred: * Check 8/9 error: aws_datasync_location_fsx_ontap_file_system.test: Attribute 'protocol.0.smb.0.password' expected "MyPassw0rd1", got "" --- FAIL: TestAccDataSyncLocationFSxONTAPFileSystem_smb (2705.00s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/datasync 2710.293s FAIL make: *** [testacc] Error 1
…ds in smb" This reverts commit 165cc9d.
…turned from the API, so propagate from configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccDataSyncLocationFSxONTAPFileSystem_basic\|TestAccDataSyncLocationFSxONTAPFileSystem_smb' PKG=datasync
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/datasync/... -v -count 1 -parallel 20 -run=TestAccDataSyncLocationFSxONTAPFileSystem_basic\|TestAccDataSyncLocationFSxONTAPFileSystem_smb -timeout 720m
=== RUN TestAccDataSyncLocationFSxONTAPFileSystem_basic
=== PAUSE TestAccDataSyncLocationFSxONTAPFileSystem_basic
=== RUN TestAccDataSyncLocationFSxONTAPFileSystem_smb
=== PAUSE TestAccDataSyncLocationFSxONTAPFileSystem_smb
=== CONT TestAccDataSyncLocationFSxONTAPFileSystem_basic
=== CONT TestAccDataSyncLocationFSxONTAPFileSystem_smb
--- PASS: TestAccDataSyncLocationFSxONTAPFileSystem_smb (2432.96s)
--- PASS: TestAccDataSyncLocationFSxONTAPFileSystem_basic (2537.83s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/datasync 2543.360s
@acwwat Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.19.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 pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Adds the missing
domain
,user
, andpassword
fields to thesmb
block's model for theaws_datasync_location_fsx_ontap_file_system
resource, so that they are passed to the underlying AWS API request properly. Currently these fields are captured by the Terraform config but not passed down to the AWS API call.Update: Found an issue with the
password
field not persisted since it's a sensitive field in the AWS API. This causes Terraform to always detect a resource change. This issue has been fixed and all CRUD operations have been tested locally.Relations
Closes #33601
References
n/a
Output from Acceptance Testing
n/a - I need help with writing the tests because this change is for testing an FSx ONTAP file system that requires an AD domain. I am not sure how to best change the existing test file.
I built and tested the code using development override locally in my own AWS environment and the DataSync location with SMB parameters (domain, user, password) was created successfully.