Comments (4)
Hi @verdel!
As I understand reading the main conversation between you and imrannayer from the attached link and from this one:
You have an existing google_sql_database
resource, but then when you update any other resources that aren't the google_sql_database
it internally changes the settings.version
Please confirm this statement to understand your needs.
from terraform-provider-google.
@ggtisc, not quite. I'm creating a google_sql_database_instance
(not google_sql_database
) resource, and after some time when executing terraform plan
or terraform apply
, I get a warning in the command output indicating that the settings.version
attribute of the resource has changed. Meanwhile, no other attributes within settings
change (although, based on the purpose of settings.version
— which is to be an incrementing revision number of settings — this attribute should not change unless another settings
key changes).
The warning that I receive in the command output:
Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan
from terraform-provider-google.
Then you have the existing google_sql_database_instance
resource without making changes for a long time. And one day without making any change again to that same resource or adding other new resources to that project you simply run a terraform apply
or a terraform plan
and it change the version of this unique resource? or were there changes to other resources in the same project?
from terraform-provider-google.
@ggtisc, the Terraform code does not change between calls to terraform apply. No changes are made in the web interface
or through gcloud
either. Nothing changes in other resources within the project. The output of terraform plan
or terraform apply
indicates that only the settings.version
attribute changes.
In the JSON API documentation, it is written that settingsVersion
is the version of instance settings. This means that changes to this attribute(settings.version
) can only occur if the settings
object itself changes.
I thought that one possible reason for the change in settings.version
might be that some sub-attributes present in a Google Cloud PostgreSQL instance are not being saved in the Terraform state. If this sub-attribute changes on the platform side, then settings.version
will change, but since the sub-attribute is beyond the visibility for the Terraform state, in the output of terraform plan
or terraform apply
we will only see the change in settings.version
.
I checked in the resource_sql_database_instance.go code all the sub-attributes that are saved in the Terraform state and noticed a discrepancy with the documentation only in one attribute - databaseReplicationEnabled
. This is just my guess, but it is the only difference from the documentation that I see right now.
Unfortunately, I can't yet explain why the real state of a Google Cloud PostgreSQL instance might only differ in settings.version
from the Terraform state.
I am currently waiting for the settings.version change to be reproduced without changes in other sub-attributes.
As I currently do not have my own data to confirm this behavior, in the process of creating this issue, I requested data from another participant(@juliusoh) in the discussion of the issue in the terraform-google-modules/terraform-google-sql-db repository.
from terraform-provider-google.
Related Issues (20)
- Failing test(s): TestAccDatastreamConnectionProfile_datastreamConnectionProfilePostgresqlPrivateConnectionExample
- Can't set disable_default_iam_recipients to true if monitoring_notification_channels are not set or threshold_rules are set
- ENHANCEMENT: Please pass `force=True` to GCP API when deleting private connections HOT 1
- google_vmwareengine_network_peering - Does not rebuild HOT 1
- Terraform fails to include database version for Google ML-integrated instances, causing updates to be rejected HOT 1
- google_firebase_app_check_debug_token: The debug_token.token should be a UUID4 HOT 2
- apigee_environment_iam lacks info on the `org_id` field
- Add support to google_sql_ssl_cert for user project overrides
- Add support to google_sql_user for user project overrides
- GCS bucket names are not validated during terraform plan HOT 1
- Add support for configuring forward proxy in google_apigee_environment resource HOT 4
- Add support for multi-region sweepers HOT 3
- add enablePrivateServiceConnect to google_vertex_ai_endpoint HOT 3
- Failing test(s): TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
- Add data source for retrieving multiple objects from a GCS bucket HOT 1
- google_endpoints_service: diff of `protoc_output_base64` should be suppressed HOT 1
- Add data source for retrieving multiple GCS buckets from a project HOT 2
- Separate resource for adding additional consumers to an existing service attachement
- Upper case letters in group names break google_bigquery_dataset_access HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-google.