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

Ignore changes to root_password #279

Conversation

iamasmith
Copy link
Contributor

root_password can only be set by the provider when
the instance is provisioned and it seems that even if
the provider could read the password then one would not
wish to destroy and recreate the instance because the
password did not match what was in Terraform.

This is specifically relevant to emergency maintenance
where somebody might have to re-import a cloned version
of the SQL server into state in a cleanup exercise. The
imported server has a null root_password because that is
what the provider has to set it to on import. The password
currently present in the state in this scenario will force
a destroy and create of the instance because of this
change.

The way to avoid this is to ignore changes for root_password

root_password can only be set by the provider when
the instance is provisioned and it seems that even if
the provider could read the password then one would not
wish to destroy and recreate the instance because the
password did not match what was in Terraform.

This is specifically relevant to emergency maintenance
where somebody might have to re-import a cloned version
of the SQL server into state in a cleanup exercise. The
imported server has a null root_password because that is
what the provider has to set it to on import. The password
currently present in the state in this scenario will force
a destroy and create of the instance because of this
change.

The way to avoid this is to ignore changes for root_password
@comment-bot-dev
Copy link

@iamasmith
Thanks for the PR! 🚀
✅ Lint checks have passed.

@morgante
Copy link
Contributor

Test failure is unrelated.

@morgante morgante merged commit d8c9959 into terraform-google-modules:master Feb 18, 2022
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.

None yet

3 participants