-
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
Add transfer for sftp service support only server #6639
Add transfer for sftp service support only server #6639
Conversation
0e592b5
to
3e4d0f1
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.
This is off to a great start, @kterada0509! Thanks so much for the contribution. Please see the initial comments below and let us know if you have any questions or do not have time to implement the feedback.
aws/tagsTransferServer.go
Outdated
// First, we're creating everything we have | ||
create := make(map[string]interface{}) | ||
for _, t := range newTags { | ||
create[*t.Key] = *t.Value |
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.
To prevent potential panics, we should use the AWS Go SDK provided functions for dereferencing here, e.g.
create[*t.Key] = *t.Value | |
create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) |
Same with the *
dereferences below. 👍
@bflad |
3e4d0f1
to
98927a3
Compare
Test Result
|
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.
Let's get this in so folks can get started with this today. Thanks, @kterada0509! 🚀
--- PASS: TestAccAWSTransferServer_disappears (8.49s)
--- PASS: TestAccAWSTransferServer_apigateway (21.58s)
--- PASS: TestAccAWSTransferServer_basic (22.16s)
This has been released in version 1.52.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
* `url` - (Optional) - URL of the service endpoint used to authenticate users with an `identity_provider_type` of `API_GATEWAY`. | ||
* `identity_provider_type` - (Optional) The mode of authentication enabled for this service. The default value is `SERVICE_MANAGED`, which allows you to store and access SFTP user credentials within the service. `API_GATEWAY` indicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice. | ||
* `logging_role` - (Optional) Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes. | ||
* `tags` - (Optional) A mapping of tags to assign to the resource. |
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.
these docs say that the tags are optional, but applying a resource without tags doesn't work:
Error: Error applying plan:
1 error(s) occurred:
* aws_transfer_server.sftp_server: 1 error(s) occurred:
* aws_transfer_server.sftp_server: Error creating Transfer Server: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, CreateServerInput.Tags.
i'm happy to open a PR to fix, but i guess i wanna verify that these are meant to be optional. i know that the AWS API doesn't require the tags, but i don't know if terraform wants them to be required?
tags := tagsFromMapTransferServer(d.Get("tags").(map[string]interface{})) | ||
|
||
createOpts := &transfer.CreateServerInput{ | ||
Tags: tags, |
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 think that this is the line that's causing the tags to be "required" when they're supposed to be optional. if we provide the Tags
attribute in the CreateServerInput call, they cannot be empty.
Is there way to add hostname property to transfer service, and/or also integrate it with Route53? Current implementation creates service with empty hostname: "-" |
I think you'd want to use the route53 resources. All the UI does is make
the route53 records for you.
…On Thu, Dec 20, 2018, 19:02 dbuzolin-nfl ***@***.*** wrote:
Is there way to add hostname property to transfer service, and/or also
integrate it with Route53? Current implementation creates service with
empty hostname: "-"
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6639 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAY4IvBNGBwBcjtC_rQlQ0z5Lvx80CCjks5u7CUkgaJpZM4Y5YQh>
.
|
That is correct, but the issue is different. AWS assigns this link via two tags:
and there is now way to create those in terraform, they are simply ignored. Because of this current implementation is not really usable. |
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_server
for create AWS Transfer for SFTP Service's server.Output from acceptance testing:
TODO