-
Notifications
You must be signed in to change notification settings - Fork 9
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
Data resources are read when no changes are present #20
Comments
This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response. |
Still a problem. |
This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response. |
Issue remains |
im not sure how to reproduce this. could you make a minimal example and provide steps, and output that i should be looking at. |
Sigh, I'm unable to reproduce this with a new project however our existing projects suffer from ytt values being re-read every single time terraform apply is run. Since I'm unsure how to reproduce this consistently you can close. Simple example of what we see on every apply:
Could it be related to the ID somehow or the debug logging? |
@braunsonm hmm, this gives me a little more to go on. will take a closer look into "id". which version of tf are you using? |
v1.0.2, latest of the carvel tools. The ytt state looks something like this {
"module": "module.mymodule",
"mode": "data",
"type": "carvel_ytt",
"name": "example",
"provider": "provider[\"vmware-tanzu/carvel\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"config_yaml": null,
"debug_logs": false,
"files": [
"../modules/mymodule/ytt.yml",
],
"id": "<random string>",
"ignore_unknown_comments": false,
"result": "snip",
"values": {
"example": "example"
},
"values_yaml": null
},
"sensitive_attributes": [
[
{
"type": "get_attr",
"value": "values"
},
{
"type": "index",
"value": {
"value": "example",
"type": "string"
}
}
]
]
}
]
}, |
Hey @cppforlife any suggestions? |
What steps did you take:
I have multiple modules with ytt data sources. On every terraform plan or apply, all the ytt resources are listed again as dirty and needing to be read.
What happened:
The data resource for ytt will always appear in the terraform plan/apply phase. This usually points to an issue with the provider not properly tracking state. Since this is files on the file system, perhaps you can save file hashes for ytt to know when a read needs to take place.
What did you expect:
Only ytt files that had changes should require being read in again. All other data sources should not need to appear in every plan.
Anything else you would like to add:
This makes it difficult to track changes in large deployments since every kapp and ytt resource is shown as being dirty we can't easily tell what actually changed.
hashicorp/terraform#25805
The text was updated successfully, but these errors were encountered: