terraform-provider-redshift icon indicating copy to clipboard operation
terraform-provider-redshift copied to clipboard

Redshift cluster 404

Open gopal-ramdugu opened this issue 3 years ago • 4 comments

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.

gopal-ramdugu avatar Mar 02 '22 21:03 gopal-ramdugu

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.

winglot avatar Mar 04 '22 08:03 winglot

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" }

gopal-ramdugu avatar Mar 04 '22 21:03 gopal-ramdugu

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.)

gopal-ramdugu avatar Mar 04 '22 22:03 gopal-ramdugu

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.

pawelaugustyn avatar Mar 07 '22 13:03 pawelaugustyn