🤖🤖🤖 r/aws_redshift_cluster: Add VPC endpoint attributes#47435
Open
faridnsh wants to merge 1 commit intohashicorp:mainfrom
Open
🤖🤖🤖 r/aws_redshift_cluster: Add VPC endpoint attributes#47435faridnsh wants to merge 1 commit intohashicorp:mainfrom
faridnsh wants to merge 1 commit intohashicorp:mainfrom
Conversation
Contributor
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
7769c93 to
1a54e1b
Compare
This was referenced Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
No.
Description
Adds computed
vpc_endpointsattributes toaws_redshift_clusteranddata.aws_redshift_cluster, populated fromCluster.Endpoint.VpcEndpoints.The nested shape mirrors
aws_redshift_endpoint_accessvpc_endpoint, includingnetwork_interfaceentries withprivate_ip_addressfor use cases such as registering Redshift endpoint IPs as Network Load Balancer targets.Updated resource/data source documentation and added a changelog entry.
AI usage: Used an LLM coding agent to help implement the feature. I did it with Codex GPT 5.4 on xplus with AWS knowledge MCP so it can lookup the APIs.
I also tested it manually by importing existing clusters with different VPC endpoints(somehow one cluster has 3 network interfaces another only 1) and also using the data.aws_redshift_cluster on them and verified the output.
Relations
Closes #46079
References
The AWS Redshift API response for the
DescribeClustersoperation contains a list of VPC Endpoints atClusters[*].Endpoint.VpcEndpoints[*]1. Each VPC Endpoint then describes its own network interface IPs atNetworkInterfaces[*].PrivateIpAddress2.Truncated response example.
{ "Clusters": [ { "ClusterIdentifier": "my-redshift-provisioned-cluster", "Endpoint": { "Address": "my-redshift-provisioned-cluster.abcdefghi.eu-west-1.redshift.amazonaws.com", "Port": 5439, "VpcEndpoints": [ { "VpcEndpointId": "vpce-0123456789", "VpcId": "vpc-0123456789", "NetworkInterfaces": [ { "NetworkInterfaceId": "eni-0123456789", "SubnetId": "subnet-0123456789", "PrivateIpAddress": "10.0.0.123", "AvailabilityZone": "eu-west-1b" } ] } ] }, [...] } ] }The same information is available in the output of the AWS Go SDK v2 34 equivalent of the DescribeClusters API request.
The information about the VPC endpoints is also available in the response of the CreateCluster API request.
Output from Acceptance Testing
Note that some tests failed due to Terraform attempting to operations when cluster has invalid state. These are other bugs in the tests or code and should be fixed outside of this PR, I'll make separate issues for them and see if they can be fixed or not.
Acceptance test output
Footnotes
https://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusters.html#API_DescribeClusters_ResponseElements ↩
https://docs.aws.amazon.com/redshift/latest/APIReference/API_VpcEndpoint.html ↩
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/redshift#DescribeClustersOutput ↩
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/redshift@v1.62.0/types#Endpoint ↩