mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-03 03:00:16 -05:00
Similar to `after_unknown`, `before_sensitive` and `after_sensitive` are values with similar structure to `before` and `after` which encode the presence of sensitive values in a planned change. These should be used to obscure sensitive values from human-readable output. These values follow the same structure as the `before` and `after` values, replacing sensitive values with `true`, and non-sensitive values with `false`. Following the `after_unknown` precedent, we omit non-sensitive `false` values for object attributes/map values, to make serialization more compact. One difference from `after_unknown` is that a sensitive complex value (collection or structural type) is replaced with `true`. If the complex value itself is sensitive, all of its contents should be obscured.
95 lines
2.4 KiB
JSON
95 lines
2.4 KiB
JSON
{
|
|
"format_version": "0.1",
|
|
"planned_values": {
|
|
"root_module": {
|
|
"child_modules": [
|
|
{
|
|
"address": "module.my_module",
|
|
"child_modules": [
|
|
{
|
|
"resources": [
|
|
{
|
|
"address": "module.my_module.module.more.test_instance.test",
|
|
"mode": "managed",
|
|
"type": "test_instance",
|
|
"name": "test",
|
|
"provider_name": "registry.terraform.io/hashicorp/test",
|
|
"schema_version": 0,
|
|
"values": {
|
|
"ami": "bar-var"
|
|
}
|
|
}
|
|
],
|
|
"address": "module.my_module.module.more"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"resource_changes": [
|
|
{
|
|
"address": "module.my_module.module.more.test_instance.test",
|
|
"module_address": "module.my_module.module.more",
|
|
"mode": "managed",
|
|
"type": "test_instance",
|
|
"name": "test",
|
|
"provider_name": "registry.terraform.io/hashicorp/test",
|
|
"change": {
|
|
"actions": [
|
|
"create"
|
|
],
|
|
"before": null,
|
|
"after": {
|
|
"ami": "bar-var"
|
|
},
|
|
"after_unknown": {
|
|
"id": true
|
|
},
|
|
"after_sensitive": {},
|
|
"before_sensitive": false
|
|
}
|
|
}
|
|
],
|
|
"configuration": {
|
|
"root_module": {
|
|
"module_calls": {
|
|
"my_module": {
|
|
"source": "./modules",
|
|
"module": {
|
|
"module_calls": {
|
|
"more": {
|
|
"source": "./more-modules",
|
|
"module": {
|
|
"resources": [
|
|
{
|
|
"address": "test_instance.test",
|
|
"mode": "managed",
|
|
"type": "test_instance",
|
|
"name": "test",
|
|
"provider_config_key": "more:test",
|
|
"expressions": {
|
|
"ami": {
|
|
"references": [
|
|
"var.test_var"
|
|
]
|
|
}
|
|
},
|
|
"schema_version": 0
|
|
}
|
|
],
|
|
"variables": {
|
|
"test_var": {
|
|
"default": "bar-var"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|