-
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_vpc_endpoint_service requires additional filter block or name resolution #11168
Comments
@TrickMcCarthy Could you please provide an example? |
There is no option under the terraform resources to create a vpc_endpoint_service with a Name field (that you can see in the console) and there is no option to read the data source for vpc_endpoint_service using Name field as the retrieval index. This means that the service that is using the vpc_endpoint_service needs to know the service_name field of the vpc_endpoint_service. This service_name attribute of vpc_endpoint_service gets generated each time the vpc_endpoint_service is recreated. The user of the endpoint needs to utilise the hardcoded service_name to retrieve the endpoint_service information, rather than some agreed Name attribute that doesn't change. If you could use the Name attribute, then when the vpc_endpoint_service is recreated, the consumer would not need to update the data entry as they could use the Name attribute(which is not generated on create). So the actions would be allow the creation the the vpc_endpoint_service to add the value for Name Attribute and the data source for vpc_endpoint_service to specify this Name attribute to retrieve the endpoint service_name. |
@TrickMcCarthy In common with many other EC2/VPC resources the Name column in the AWS Console corresponds to a resource tag with the resource "aws_vpc_endpoint_service" "test" {
tags = {
Name = "test-11168"
}
} looks like this in the console The corresponding data source story is where we currently have a gap. Related: |
Support for this functionality has been merged and will release with version 2.55.0 of the Terraform AWS Provider, likely later today. Thanks to @ewbankkit for the investigative work above and @DrFaust92 for the implementation. 👍 |
This has been released in version 2.55.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 for triage. Thanks! |
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! |
This issue was originally opened by @TrickMcCarthy as hashicorp/terraform#23591. It was migrated here as a result of the provider split. The original body of the issue is below.
SDK version
Use-cases
https://www.terraform.io/docs/providers/aws/d/vpc_endpoint_service.html
This only supports service_name and service. It is missing support for the Name attribute.
The service_name and service are auto-generated each time the service endpoints are created.
The only way to utilize the data source is to hardcode the generated service_name or service id.
In the case I am experiencing the service endpoint is generated by a different service with different terraform state file.
Without supporting retrieval using an end user specified name, this hardcoded value needs to be manually updated each time the service endpoint is recreated. This creates a tight coupling between the services and requires coordination whenever the service endpoint is recreated. It would be much better to reduce this tight coupling.
Attempted Solutions
While the remote_state can be used as a workaround, but it leaves things with tight coupling and this coupling is not suitable when you are trying to upgrade terraform between versions where the state file formats change.
https://www.terraform.io/docs/providers/terraform/d/remote_state.html
Proposal
Add filter block support or retrieval based on the Name attribute, or both.
References
I could not find any, but the original data source was added by this PR
#8396
The text was updated successfully, but these errors were encountered: