-
Notifications
You must be signed in to change notification settings - Fork 425
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
Configuration drift due to settings.version in the outputs of the modules #548
Comments
Perhaps, I wasn't able to fully describe the issue. The Are you absolutely certain that the described issue is an upstream problem? |
@verdel yes this is something provider can handle. Just let them know this is a readonly setting and should not be shown as diff. Once you have the issue created can you mention the link here so we get an update. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Why don't just use lifecycle
|
As far as I know,
So, using The resolution to this issue could be achieved by either omitting the attribute |
@verdel do you have an issue open for the provider? If so can u mention it here so we can track it? |
I apologize, but due to the workload, I haven't been able to find time for this. Now I've returned to this issue and will try to reproduce the error again to gather data for opening new issue in the provider repository |
I haven't been able to reproduce the problem yet. At some point, we stopped using the A few days ago, I specifically created such a resource and outputted the So far, this hasn't happened. If someone could help me with preparing the data for opening an issue in the provider's repository, I would be very grateful. I need to confirm that the value of |
At the moment, I have managed to reproduce the change of |
@verdel provider should not show the drift on parameters which we dont have any control over. For that reason they need to ignore these changes for diff. They can still show it just not as diff. |
@imrannayer, I apologize for taking your time to discuss potentially elementary questions. I created this issue because I was experiencing configuration drift due to the change in the At the moment, I was only able to capture the change in the I can achieve the behavior described in the issue by directly changing the version value in the tfstate file and running If the issue is confirmed, am I correct in understanding that I would need to suggest to the provider development team to add a Or did you imply a different solution to the problem with the attribute:
Is there possibly another way to indicate that an attribute change should not be displayed as a resource diff? In any case, I need to wait for the problem to be reproduced. Without confirmation, I see no point in opening an issue in the provider's upstream repository. |
was there a solution for this? |
@juliusoh, Is it possible for you to provide me with the output of |
Terraform used the selected providers to generate the following execution
Terraform will perform the following actions: module.pg.google_sql_database.default[0] will be created
Plan: 1 to add, 0 to change, 0 to destroy. ───────────────────────────────────────────────────────────────────────────── Note: You didn't use the -out option to save this plan, so Terraform can't module.pg.google_sql_database_instance.default has changed~ resource "google_sql_database_instance" "default" { id = "builderfax-stage-db-02df5265" name = "builderfax-stage-db-02df5265" # (14 unchanged attributes hidden)~ settings {
}Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to undo or respond to these changes |
@juliusoh, thank you very much for the information. I will try to open an Issue in the terraform provider repository as soon as possible. |
@juliusoh, @imrannayer, I created an issue in the provider's repository. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Not a stale issue. Still present. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
TL;DR
In the resources of
google_sql_database_instance
, there is an attributesettings.version
that cannot be specified or modified in the configuration, and it is set externally. Due to the fact that completegoogle_sql_database_instance
resources are constantly passed in the output of modules, configuration drift occurs.Expected behavior
We do not modify the configuration in the Terraform code, and when we run terraform plan, we receive information that everything is in the up-to-date state
Observed behavior
As the value of the
settings.version
attribute can change externally, when we runterraform plan
, we receive a message about configuration drift.Terraform Configuration
Terraform Version
Additional information
As a solution, we could filter out
settings.version
attribute in theoutput
variables as follows:Changes in the code have been made using the example of the PostgreSQL module. If this solution works for you, I could prepare a pull request and update the output variables in all affected modules.
The text was updated successfully, but these errors were encountered: