Skip to content

feat(resource_redshift_database): basic zeroetl support#43

Open
Intuinewin wants to merge 4 commits intodbsystel:masterfrom
Intuinewin:db_integration
Open

feat(resource_redshift_database): basic zeroetl support#43
Intuinewin wants to merge 4 commits intodbsystel:masterfrom
Intuinewin:db_integration

Conversation

@Intuinewin
Copy link
Copy Markdown

SmallPR which enables zeroetl support for the database resource

Unfortunately, I haven't found a way to query on the cluster if a db is associated with an integration

Ref: https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_DATABASE.html

@mmichaelb
Copy link
Copy Markdown

Thank you for your contribution. Again, sorry for the late feedback. The PR looks good so far but an integration/acceptance test is missing. Please provide one simple parameterized test that can be used to test a zeroetl database integration.

@alexjurkiewicz
Copy link
Copy Markdown

I asked Claude to address the review feedback because this feature is also potentially useful to us. Here are the commits we came up with:

  • 849ec78 — Replace ExactlyOneOf with ConflictsWith on datashare_source and zeroetl_integration. ExactlyOneOf requires one of the two to always be set, which prevents creating a plain local database. ConflictsWith allows both to be absent while still preventing them from being combined.

  • 12844ad — Preserve zeroetl_integration state across Read. The Redshift catalog doesn't expose the integration ID after creation, so Read can't reconstruct it. Without this fix, subsequent plans show spurious drift and destroy/recreate the database.

  • a13e588 — Acceptance test for the conflict validation (TestAccResourceRedshiftDatabase_ZeroETLConflictsWithDatashare). This runs without any special infrastructure — it only needs a Redshift connection.

  • 5e3ed36 — Acceptance test for the full zero ETL flow (TestAccResourceRedshiftDatabase_ZeroETL). Skipped unless REDSHIFT_ZERO_ETL_INTEGRATION_ID is set. Requires a pre-existing zero ETL integration and a cluster of ra3.xlplus or larger.

Intuinewin and others added 4 commits April 9, 2026 11:03
…ith on datashare_source and zeroetl_integration

ExactlyOneOf required one of the two blocks to always be set, which
prevented creating a plain local database. ConflictsWith allows both to
be absent while still preventing them from being set simultaneously.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cceptance test

Validates that setting both zeroetl_integration and datashare_source in
the same resource configuration produces a plan-time error. This test
runs without any real AWS infrastructure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Creates a database from a zero ETL integration and verifies the
integration_id attribute is preserved across plan/apply cycles.

Requires REDSHIFT_ZERO_ETL_INTEGRATION_ID to be set; skipped otherwise.
The target Redshift cluster must be ra3.xlplus or larger, as smaller
node types do not support zero ETL integrations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Intuinewin
Copy link
Copy Markdown
Author

Thanks @alexjurkiewicz , I cherry-picked your commits except 12844ad as I don't think it's necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants