terraform-provider-redshift
terraform-provider-redshift copied to clipboard
Redshift cluster 404
Hello, I am trying to create a redshift data share and I am getting below error. The cluster is not accessible externally. Does this plugin requires it be public ?
operation error Redshift: GetClusterCredentials, https response error StatusCode: 404, RequestID: 54f7c64e-ecba-4910-a982-0134da944dcf, ClusterNotFoundFault: Cluster redshift-cluste not found.
Hi, no, the provider does not require the cluster to be public. It requires that the user of the provider has access to the cluster, whether it is by public access, VPN to private cluster, or proxy.
Looking at the error you provided, it seems that you are trying to use the temporary credentials auth method and the returned error is from AWS API saying that the provided redshift cluster name redshift-cluste (not the missing r at the end) does not exists in your account.
Please verify that you have provided a valid and existing cluster name for temporary credentials.
I have the right name of the cluster is there anything else is needed for the provider config ?
provider "redshift" { host = "xx.redshift.amazonaws.com" username = "awsuser" temporary_credentials { cluster_identifier = "redshift-cluste" }
I think this is the key. The terraform runs from my machine. The users use it using workspaces.
(public access, VPN to private cluster, or proxy.)
Another possible root cause for your issue is that cluster is defined in a different region than the one defined in your config. Please check if setting AWS_REGION env variable to the appropriate region name resolves your issue.
For example, to set us-east-1 as target AWS region put export AWS_REGION=us-east-1 in your terminal.