Created
May 9, 2024 01:24
-
-
Save seansummers/6ac578f18a82066aa4b4e1bdc048c61e to your computer and use it in GitHub Desktop.
Stupid TF Tricks
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
# how do we get credentials in here? Who knows.... | |
data "external" "stack" { | |
program = [ "xargs", "-0", | |
"aws", "cloudformation", "describe-stack-resource", "--output", "json", | |
"--query", "StackResourceDetail.{id:PhysicalResourceId}" ] | |
query = { | |
StackName: "StackName", | |
LogicalResourceId: "LogicalResourceName", | |
} | |
} | |
output "physical_stack_resource": | |
value = data.external.stack.result.id | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment