mirror of https://github.com/hashicorp/terraform
`terraform show -json`: Add Errored field to output for plan (#33372)
* Add Errored field to JSON output * Fix test error messagepull/33395/head
parent
66e3c20b18
commit
49f99db1c2
@ -0,0 +1,15 @@
|
||||
locals {
|
||||
ami = "bar"
|
||||
}
|
||||
|
||||
resource "test_instance" "test" {
|
||||
ami = local.ami
|
||||
|
||||
lifecycle {
|
||||
precondition {
|
||||
// failing condition
|
||||
condition = local.ami != "bar"
|
||||
error_message = "ami is bar"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
{
|
||||
"format_version": "1.2",
|
||||
"planned_values": {
|
||||
"root_module": {}
|
||||
},
|
||||
"prior_state": {},
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"test": {
|
||||
"full_name": "registry.terraform.io/hashicorp/test",
|
||||
"name": "test"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "test_instance.test",
|
||||
"expressions": {
|
||||
"ami": {
|
||||
"references": [
|
||||
"local.ami"
|
||||
]
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "test",
|
||||
"provider_config_key": "test",
|
||||
"schema_version": 0,
|
||||
"type": "test_instance"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"errored": true
|
||||
}
|
||||
Loading…
Reference in new issue