Remove marking of entire object as unknown when child attribute is unknown#63
Merged
austinvalle merged 2 commits intomainfrom Oct 10, 2023
Merged
Remove marking of entire object as unknown when child attribute is unknown#63austinvalle merged 2 commits intomainfrom
austinvalle merged 2 commits intomainfrom
Conversation
austinvalle
commented
Oct 10, 2023
Member
Author
|
I did some testing with the petstore workflow example (where I originally ran into invalid plan errors due to a nested attribute being marked as unknown): resource "petstore_pet" "clifford" {
id = 12345
name = "Clifford the Big Red Dog"
photo_urls = [
"https://example.com/pet.jpg"
]
category = {
id = 1
# name is a computed/optional field!
}
}Now the $ terraform apply -auto-approve
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│ - hashicorp.com/edu/petstore in /Users/austin.valle/go/bin
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
petstore_pet.clifford: Refreshing state... [name=Clifford the Big Red Dog]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# petstore_pet.clifford will be updated in-place
~ resource "petstore_pet" "clifford" {
+ category = {
+ id = 1
+ name = (known after apply)
}
id = 12345
name = "Clifford the Big Red Dog"
+ status = (known after apply)
+ tags = (known after apply)
# (1 unchanged attribute hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
petstore_pet.clifford: Modifying... [name=Clifford the Big Red Dog]
petstore_pet.clifford: Modifications complete after 0s [name=Clifford the Big Red Dog]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed. |
bflad
approved these changes
Oct 10, 2023
Contributor
bflad
left a comment
There was a problem hiding this comment.
This seems like better behavior for this functionality 👍
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR: