Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DAT-18567] DevOps :: liquibase-databricks terraform fails to recreate IT tests schema #180

Merged
merged 4 commits into from
Sep 2, 2024

Conversation

jandroav
Copy link
Contributor

@jandroav jandroav commented Sep 2, 2024

Force recreation by changing the endpoint name dynamically. It will trigger Terraform to destroy the existing resource and create a new one. This will ensure that a new SQL endpoint is created each time you apply the Terraform configuration, as the name will always be unique.

🔧 (auth.tf): Update type assignment formatting for DBX_TOKEN variablefor consistency
✨ (dbsql_endpoint.tf): Add random suffix to endpoint name for uniqueness
♻️ (schema.auto.tfvars): Align TF_VAR_TEST_CATALOG and TF_VAR_TEST_SCHEMA assignments for consistency
♻️ (schema.tf): Refactor type and default assignments for TF_VAR_TEST_SCHEMA, TF_VAR_TEST_CATALOG, and schema_force_destroy variables for consistency

… for consistency

✨ (dbsql_endpoint.tf): Add random suffix to endpoint name for uniqueness
♻️ (schema.auto.tfvars): Align TF_VAR_TEST_CATALOG and TF_VAR_TEST_SCHEMA assignments for consistency
♻️ (schema.tf): Refactor type and default assignments for TF_VAR_TEST_SCHEMA, TF_VAR_TEST_CATALOG, and schema_force_destroy variables for consistency
…s before applying changes for better control and accuracy

🔧 (dbsql_endpoint.tf): remove random suffix generation for endpoint name to simplify and standardize naming convention
@jandroav
Copy link
Contributor Author

jandroav commented Sep 2, 2024

Manually Taint the Resources: Before running terraform apply we are running a taint over the sql endpoint and schema to force its destruction and recreation

Alejandro Alvarez added 2 commits September 2, 2024 14:22
…rce before tainting another resource for better resource management

🔧 (dbsql_endpoint.tf): add random suffix to the name of the databricks_sql_endpoint resource to ensure uniqueness and improve resource identification
…mmands to prevent failing the workflow if the resources are already imported or tainted
Copy link

sonarcloud bot commented Sep 2, 2024

@KushnirykOleh KushnirykOleh merged commit bc9387f into main Sep 2, 2024
17 checks passed
@KushnirykOleh KushnirykOleh deleted the DAT-18567 branch September 2, 2024 13:42
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.

2 participants