aws / aws-sdk-go

AWS SDK for the Go programming language.
http://aws.amazon.com/sdk-for-go/
Apache License 2.0
8.65k stars 2.07k forks source link

VPC Endpoints and Endpoint Services: TagSpecification's Resource value - description/model inconsistency #3182

Closed swoldemi closed 4 years ago

swoldemi commented 4 years ago

There seems to be an inconsistency in the valid values and constants available for resources that support tag-on-create. I noticed in the most recent (v1.29.16) release of the SDK were support for tagging/tagging on creation of VPC Flow Logs was added, vpc-flow-log is exposed in ec2.ResourceTypeVpcFlowLog.

But the v1.19.31 release that added support for tag-on-create of vpc endpoints does not have a respective update because the model was not updated to reflect the change.

This is also prevalent in the API documentation where the description of the ResourceType field contains values that are not reflected in the model of the field. The values in the description do not match the valid values available in the model, making it harder to determine from reading the SDK documentation of ec2.TagSpecification.ResourceType what values can be passed when calling a Create* API for a resource that supports tag-on-create.

Yes, it's easy to guess that the resource value for a VPC endpoint is vpc-endpoint, but the default endpoint created is a gateway endpoint, which requires vpc-endpoint-service. So unless one sets ec2.CreateVpcEndpointInput.VpcEndpointType to ec2.VpcEndpointTypeInterface, the first guess of vpc-endpoint won't be right.

I understand this isn't an issue with the SDK but it's something I noticed using the SDK so I felt it was appropriate to open an issue here!

diehlaws commented 4 years ago

Thanks for bringing this to our attention @swoldemi. I will reach out to the EC2 service team about this internally, once I hear back from them I will update this issue accordingly.

diehlaws commented 4 years ago

@swoldemi thanks for your patience and I do apologize for the delay in response on this. The API model and documentation for EC2 have been updated to include the missing TagSpecification.ResourceType values, this is available as of version 1.29.21 of the SDK.

Please do let us know if you continue running into issues, or if you have additional questions for us about this.