-
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
Add Transfer User Resource Support #6850
Add Transfer User Resource Support #6850
Conversation
cbbf69e
to
345d4dd
Compare
345d4dd
to
43d4079
Compare
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.
Hi @kterada0509 👋 Thanks for submitting this. Please see the initial feedback below and let us know if you have any questions or do not have time to implement the items.
|
||
func testAccAWSTransferUserConfig_update(rName string) string { | ||
return fmt.Sprintf(` | ||
resource "aws_transfer_server" "foo" { |
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.
Nit: I would recommend moving the common server and IAM role related resources to a "base" configuration function that can be included in the other test configuration functions to simplify the setup.
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.
I split test for option params.
But IAM Role is Requirement param, so left on base configuration.
https://docs.aws.amazon.com/transfer/latest/userguide/API_CreateUser.html#API_CreateUser_RequestSyntax
2066149
to
098682c
Compare
|
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, thanks @kterada0509! 🚀
--- PASS: TestAccAWSTransferUser_basic (7.69s)
--- PASS: TestAccAWSTransferUser_disappears (7.83s)
--- PASS: TestAccAWSTransferUser_modifyWithOptions (18.41s)
@@ -82,6 +82,34 @@ func validateTypeStringNullableFloat(v interface{}, k string) (ws []string, es [ | |||
return | |||
} | |||
|
|||
func validateTransferServerID(v interface{}, k string) (ws []string, errors []error) { |
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.
Nit: These custom validation functions can be replaced with ValidateFunc: validation.StringMatch(regexp.MustCompile(), "message")
. We'll be doing a passthrough of cleaning up all the extraneous custom validation functions after the Terraform 0.12 provider SDK is merged as it contains some very helpful new functionality in this regard. 👍
Is there a reason the ssh pub key property is not exposed? It's standard for the API: https://docs.aws.amazon.com/transfer/latest/userguide/API_CreateUser.html |
@walterheck its implemented as a separate |
This has been released in version 1.53.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Reference: #6584
Changes proposed in this pull request:
aws_transfer_user
reource supportOutput from acceptance testing:
TODO
aws_transfer_user
aws_transfer_user