Hello,
i must have done something odd, but i can’t figure out why the tfe_output returns a very different structure than usually. I appreciate you checking into this .
module 1:
data "aws_organizations_organization" "org" {}
output "org" {
value = data.aws_organizations_organization.org
}
and the output is :
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
org = {
"accounts" = tolist([
{
"arn" = "arn:aws:organizations::XXXXXXXXXX"
"email" = "XXXXXX"
"id" = "XXXXXXXXXX"
"name" = "XXXXXXX"
"status" = "ACTIVE"
},
{
"arn" = "arn:aws:organizations::XXXXXXXXXX"
"email" = "XXXXXX"
"id" = "XXXXXXXXXX"
"name" = "XXXXXXX"
"status" = "ACTIVE"
},
In the module 2:
data "tfe_outputs" "org" {
organization = "XXXXX"
workspace = "XXXXX"
}
....
for i, acc in data.tfe_outputs.org.accounts[*] :
...
Produces:
Error: Unsupported attribute
│
│ on cw_cross_account_obser.tf line 98, in locals:
│ 98: for i, acc in data.tfe_outputs.org.accounts[*] :
│
│ This object has no argument, nested block, or exported attribute named "accounts".
╵
with `terraform console --plan :
> data.tfe_outputs.org
{
"id" = "XXXXX"
"nonsensitive_values" = {
"org" = {
"accounts" = [
{
"arn" = "arn:aws:organizations::XXXXXXXX:account/XXXXXXXXXXXX"
"email" = "XXXXXXXXXXXX"
"id" = "XXXXXX"
"name" = "XXXXXXX"
"status" = "ACTIVE"
},
.....
}
}
...
data.tfe_outputs.org.nonsensitive_values.org.arn
"arn:aws:organizations::XXXXXXXX:organization/XXXXXXX
What is the source of “nonsensitive_values” and why does it appears?