Skip to content
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

Support for exporting Redshift cluster nodes and/or IP addresses #20727

Closed
ziggythehamster opened this issue Aug 30, 2021 · 3 comments
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/redshift Issues and PRs that pertain to the redshift service.

Comments

@ziggythehamster
Copy link
Contributor

(this is a resubmission of #3394)

Currently aws_redshift_cluster resources do not support exporting the cluster nodes. However it is already possible to get those back from AWS using the CLI. The cluster nodes are useful for determining the public and private IP addressed of the nodes.

While attaching an EIP seems like a possible workaround, it is quite limited when the cluster is not publicly accessible and deployed in a private subnet (which is the recommended way).

Here's a small example for to do that using the AWS CLI:

aws redshift describe-clusters --cluster-identifier <cluster-identifier>

https://docs.aws.amazon.com/redshift/latest/dg/load-from-host-steps-retrieve-key-and-ips.html

Adding to the original request:

I would also like to add that being able to filter the list by node role is a requirement for me - I currently use an external datasource that does this, so I can get the leader node private IP:

aws --region $AWS_REGION redshift describe-clusters --cluster-identifier $REDSHIFT_CLUSTER_ID | jq -c '.Clusters[0].ClusterNodes | map(select(.NodeRole == "LEADER"))[0] | { private_ip_address: .PrivateIPAddress, public_ip_address: .PublicIPAddress }'

Terraform Version

Any

Affected Resource(s)

  • aws_redshift_cluster (and the data source)
@ziggythehamster ziggythehamster added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 30, 2021
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/redshift Issues and PRs that pertain to the redshift service. labels Aug 30, 2021
@ziggythehamster
Copy link
Contributor Author

Someone had started a PR at #4563, as well.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Aug 31, 2021
@ziggythehamster
Copy link
Contributor Author

#4563 got merged into 3.57.0, which satisfies this feature request (I can use a for in loop with a filter to find the leader node easily). I'm going to close this. Thanks!

@github-actions
Copy link

github-actions bot commented Jun 7, 2022

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/redshift Issues and PRs that pertain to the redshift service.
Projects
None yet
Development

No branches or pull requests

2 participants