-
Notifications
You must be signed in to change notification settings - Fork 65
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
[Feature Request] - Option to ignore allowed_bandwidth
/kvm
properties changes
#460
Comments
These spurious changes appear to no longer happen once I got to Terraform v1.3.10. Guessing this is an incompatibility between the newer version of the provider and older versions of Terraform. I'll leave the issue open in case you want to adjust the provider for backwards compat. |
It appears I spoke too soon, the behavior appeared again at Terraform v1.4.7. |
@thehunmonkgroup Thanks for the report. Both of those are "computed" fields so aside from removing them, I'm not sure of a way to avoid these periodic updates. But, for your case, you could use the lifecycle argument in your terraform config to ensure that these changes stop interrupting your workflow. |
@optik-aper thanks for the sensible workaround |
Sadly, this does not work, adding this to my resource config: lifecycle {
ignore_changes = [
allowed_bandwidth,
kvm,
]
} Produces these errors:
I should also add that these are not 'periodic' updates -- they seem to happen quite a bit. Is there any real value in storing these in the Terraform state? As far as I understand, they are computed values and cannot be controlled by the user, nor managed by Terraform. Can't they be suppressed from inclusion in the state? |
@thehunmonkgroup Oh shoot, you're right. It's only for changes you don't want to sync up to the remote for whatever reason. I'm looking at other options but, ultimately, I don't think removing the attributes is the correct course since some folks might be using them as values for other operations. There are a lot of purely computed values in the data which don't change as often, so are not as bothersome, but are still important for some use-cases. In general, the idea is to expose anything that the API returns for the sake of consistency. If you know that your configuration hasn't changed when you're applying these changes, perhaps using the |
Yeah, I'm not quite that much of a cowboy ;) Maybe add a plugin specific arg that allows users to list values they DON'T want stored in the state? |
allowed_bandwidth
/kvm
properties marked as changed on Terraform version upgradeallowed_bandwidth
/kvm
properties changes
This seems to be a widespread concern https://discuss.hashicorp.com/t/objects-have-changed-outside-of-terraform-ignore-changes-ignored/24776 |
Some official context on this: https://support.hashicorp.com/hc/en-us/articles/4405950960147-New-Feature-Objects-have-changed-outside-of-Terraform |
Describe the bug
When upgrading Terraform versions, and running
terraform apply
on a Vultr instance that has had no changes to its configuration, theallowed_bandwidth
andkvm
properties are reported as having changed outside of Terraform.Running
terraform apply
again after the upgrade results inNo changes
as expected, but having to manually confirm these erroneous changes across many servers is a bit tedious :)To Reproduce
Steps to reproduce the behavior:
2.19.0
as of this writing)terraform init -reconfigure -upgrade && terraform apply
on an existing Vultr instance which has not had any configuration changes since lastterraform apply
Expected behavior
No changes
should be reported.The text was updated successfully, but these errors were encountered: