You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% atlas schema apply --dry-run -c file://schema/atlas.hcl --env dev
Schema is synced, no changes to be made
with the dev env configured as
env {
name = atlas.env
src = "file://schema/public.hcl"
url = "postgres://127.0.0.1?sslmode=disable"
dev = "postgres://127.0.0.1/atlas_dev?sslmode=disable"
}
But Terraform gives the following plan repeatedly on apply:
% terraform plan
...
extension "google_columnar_engine" {
schema = schema.public
version = "1.0"
+ comment = "Google extension for columnar engine"
}
extension "google_db_advisor" {
schema = schema.public
version = "1.0"
+ comment = "Google extension for Database Advisor"
}
extension "hypopg" {
schema = schema.public
version = "1.3.2"
+ comment = "Hypothetical indexes for PostgreSQL"
}
extension "postgis" {
schema = schema.public
version = "3.2.5"
comment = "PostGIS geometry and geography spatial types and functions"
}
I happen to be using GCP's AlloyDB which is essentially a managed PostgreSQL instance with some added Google-proprietary extensions. The Terraform configuration gives Atlas a separate database (on the same instance) to use as a dev database.
The dev database is empty except for the public schema.
It's possible this is user error but I haven't seen any references to this issue online or been able to track down the cause myself.
The text was updated successfully, but these errors were encountered:
ttrine
changed the title
Extension comments don't update on apply when using the Atlas Terraform provider
Extension comments not added to Terraform state when using Terraform apply with the Atlas provider
May 8, 2024
I think that's because the database (defined in TF) information schema does not return the comments as defined and returned from your local dev-database. You can simply remove these comments from the schema.hcl and re-run this.
Thanks for your suggestion @a8m. I did try that, but for some reason it yields the same Terraform plan I gave above after several applications of terraform apply.
@giautm thank you. Please let me know if you need more detail to reproduce this - I'm not sure which extra information is relevant.
Atlas itself detects no changes:
with the dev env configured as
But Terraform gives the following plan repeatedly on apply:
I happen to be using GCP's AlloyDB which is essentially a managed PostgreSQL instance with some added Google-proprietary extensions. The Terraform configuration gives Atlas a separate database (on the same instance) to use as a dev database.
The dev database is empty except for the public schema.
It's possible this is user error but I haven't seen any references to this issue online or been able to track down the cause myself.
The text was updated successfully, but these errors were encountered: