这是indexloc提供的服务,不要输入任何密码
Skip to content

Add UseStateForUnknown plan modifier to attributes that are stable when being updated #44

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

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

dglsparsons
Copy link
Collaborator

When updating a resource with Computed attributes, these attributes
will be set to unknown at plan time (as they could change).

This means any dependent resources will be flagged as requiring deletion
and recreation.

However, for the vast majority of attributes within our Terraform
provider, such as ID fields, these attributes never change when a
resource is updated. Instead, they only change when the resource is destroyed and
created again. This is the exact behaviour of the UseStateForUnknown plan modifier.

Closes #40

…when being updated

When updating a resource with `Computed` attributes, these attributes
will be set to `unknown` at plan time (as they could change).

This means any dependent resources will be flagged as requiring deletion
and recreation.

However, for the vast majority of attributes within our Terraform
provider, such as `ID` fields, these attributes _never_ change when a
resource is updated. Instead, they only change when the resource is destroyed and
created again. This is the exact behaviour of the `UseStateForUnknown` plan modifier.
@dglsparsons dglsparsons merged commit b38f0ab into main Jun 8, 2022
@dglsparsons dglsparsons deleted the stable-state branch June 8, 2022 12:55
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.

Unexpected recreation of domain when adding env variables to vercel project
2 participants