This repository was archived by the owner on Jan 17, 2025. It is now read-only.
Add external schema support#14
Merged
winglot merged 3 commits intobrainly:masterfrom Aug 6, 2021
Merged
Conversation
winglot
reviewed
Aug 3, 2021
winglot
approved these changes
Aug 6, 2021
Contributor
Author
|
Just a quick note on this one for the sake of having a written record somewhere... AWS support have confirmed that So, if anyone is looking to do make changes around the schema resource/data source, please be sure that the query on |
StevenKGER
referenced
this pull request
in dbsystel/terraform-provider-redshift
Oct 25, 2024
Update actions/setup-go action to v4
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR extends the
redshift_schemaresource and data source to support all of the available flavours of external schema documented at https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_SCHEMA.html. There is a new nested configuration block in theredshift_schemaresource, namedexternal_schema.Supported external schema sources are:
data_catalog_sourcefor AWS Glue Data Cataloghive_metastore_sourcefor a Hive metastore (I think really it only supports EMR but I haven't tested it as I don't have a Hadoop environment to test against, EMR or otherwise)rds_postgres_sourcefor federated query against RDS/Aurora PostgreSQLrds_mysql_sourcefor federated query against RDS/Aurora MySQL (note that this is currently a Preview feature and thus subject to change. Your Redshift cluster must be on the Preview maintenance track to use this)redshift_sourcefor querying a datashare from another redshift cluster (both clusters must use an instance family which supports data sharing... currently only the new RA3 instance types support data sharing)Destroy/recreate is forced when updating a terraform-managed schema, if:
external_schemato an existing redshift schema resource (switch the schema from internal to external), orexternal_schemafrom an existing redshift schema resource (switch the schema from external to internal), orexternal_schemablockThis is required because
ALTER SCHEMAdoes not support external schemas (except for changing the owner)I have included acceptance tests for all data sources, however they are conditionally enabled on specific environment variables being set. I have successfully run the ones for
data_catalog_source,rds_postgres_source, andredshift_source.