This repository was archived by the owner on Jan 17, 2025. It is now read-only.
Add simple redshift_datashare resource#18
Merged
winglot merged 1 commit intobrainly:masterfrom Aug 19, 2021
Merged
Conversation
Contributor
Author
|
@winglot if you're happy with this approach it should be pretty quick for me to add a corresponding data source. I'll also need to add a |
04e6233 to
fd0eba0
Compare
winglot
reviewed
Aug 18, 2021
| State: schema.ImportStatePassthrough, | ||
| }, | ||
| Schema: map[string]*schema.Schema{ | ||
| "name": { |
Member
There was a problem hiding this comment.
Could you move the strings to consts as other resources have?
const (
datashareNameAttr = "name"
datashareOwnerAttr = "owner"
...
)
In my opinion, this is a better approach rather than raw strings all around, it eliminates the possibility of a typo and makes it easier to rename an attribute in the future if needed.
Contributor
Author
There was a problem hiding this comment.
@winglot - I've moved the attribute names to constants and amended the commit.
fd0eba0 to
3f33c0b
Compare
winglot
approved these changes
Aug 19, 2021
StevenKGER
referenced
this pull request
in dbsystel/terraform-provider-redshift
Oct 25, 2024
…-go-v2-config-1.x Update module github.com/aws/aws-sdk-go-v2/config to v1.18.42
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 is a simplified version of #17. Effectively it's just the
automode from that PR.Adds a
redshit_datashareresource to manage data sharing between Redshift clusters. This should be defined on the producer cluster.For each schema, we
ALTER DATASHARE ADD SCHEMA. We also addALL TABLES IN SCHEMAandALL FUNCTIONS IN SCHEMAandSET INCLUDENEW=true FOR SCHEMA, so that newly-created tables/functions are automatically exposed to the datashare by the redshift cluster itself, without needing to re-run terraform.There is test coverage, however because data sharing only works on RA3 clusters, the test case is conditionally enabled on whether or not an environment variable named
REDSHIFT_DATASHARE_SUPPORTEDis set: