Created
July 11, 2021 06:40
-
-
Save podhmo/b4b4d5fcb2cca00eb43f81e6be4a8cf2 to your computer and use it in GitHub Desktop.
This file contains 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
data "terraform_remote_state" "root" { | |
backend = "local" | |
config = { | |
path = "../terraform.tfstate" | |
} | |
} | |
output "message" { | |
value = "hello ${data.terraform_remote_state.root.outputs.config.person.name}!!" | |
} |
This file contains 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
{ | |
"version": 4, | |
"terraform_version": "1.0.2", | |
"serial": 2, | |
"lineage": "79b020dd-1206-1cf8-3423-607b18805204", | |
"outputs": { | |
"message": { | |
"value": "hello foo!!", | |
"type": "string" | |
} | |
}, | |
"resources": [ | |
{ | |
"mode": "data", | |
"type": "terraform_remote_state", | |
"name": "root", | |
"provider": "provider[\"terraform.io/builtin/terraform\"]", | |
"instances": [ | |
{ | |
"schema_version": 0, | |
"attributes": { | |
"backend": "local", | |
"config": { | |
"value": { | |
"path": "../terraform.tfstate" | |
}, | |
"type": [ | |
"object", | |
{ | |
"path": "string" | |
} | |
] | |
}, | |
"defaults": null, | |
"outputs": { | |
"value": { | |
"config": { | |
"person": { | |
"age": 20, | |
"name": "foo" | |
} | |
} | |
}, | |
"type": [ | |
"object", | |
{ | |
"config": [ | |
"object", | |
{ | |
"person": [ | |
"object", | |
{ | |
"age": "number", | |
"name": "string" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"workspace": null | |
}, | |
"sensitive_attributes": [] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment