The AWS documentation on this feature show selecting a single database to share.
Cross Account Data Sharing
The Terraform docs however, do not give an argument for ‘database’, only schema.
Now I have 50 databases on my cluster, so the inference is that I can share ‘myschema’ but it will apply across all 50 databases ?
Is there not something missing in the granularity of this Terraform feature ?
redshift_datashare (resource)
Thanks for any guidance
Hi, Simon. did you solve this?
Sorry I did not.
Our project relating to this was abandoned, but may be coming back to try again soon … !
This provider seems to work at the database level. The connection info is provided in the provider configuration, so you’ll need one provider per database. You can then use the redshift_datashare resource with the provider meta-argument to create the Redshift datashare on that particular database that’s tied to the provider.
What’s a tiny bit confusing to me is that there is also a redshift_database resource that creates a database, but the provider already requires a database argument (default is redshift). Not sure if the concept is similar to master DB in SQL Server or something - I don’t really use Redshift.
There also seems to be multiple version of this redshift provider with the one having more development activity being this one from brainly. Since it’s a third-party provider, if you run into further issues, you might want to open an issue at their GitHub repository instead.