mirror of
https://github.com/adammck/terraform-inventory
synced 2024-11-22 15:52:01 +01:00
a4d1a11de8
In recent versions of the AWS Terraform provider, it is possible to attach default tags to every resource. Those tags aren't stored in the `tags` field in the Terraform state but as a special field `tags_all`. Accept tags for AWS resources from both fields to also export tags defined as default tags.
90 lines
1.7 KiB
JSON
90 lines
1.7 KiB
JSON
{
|
|
"format_version": "0.1",
|
|
"terraform_version": "0.12.1",
|
|
"values": {
|
|
"outputs": {
|
|
"my_endpoint": {
|
|
"sensitive": false,
|
|
"value": "a.b.c.d.example.com"
|
|
},
|
|
"my_password": {
|
|
"sensitive": true,
|
|
"value": "1234"
|
|
},
|
|
"map": {
|
|
"sensitive": false,
|
|
"value": {
|
|
"first": "a",
|
|
"second": "b"
|
|
}
|
|
}
|
|
},
|
|
"root_module": {
|
|
"resources": [
|
|
{
|
|
"address": "aws_instance.one",
|
|
"type": "aws_instance",
|
|
"name": "one",
|
|
"provider_name": "aws",
|
|
"schema_version": 1,
|
|
"values": {
|
|
"ami": "ami-00000000000000000",
|
|
"id": "i-11111111111111111",
|
|
"private_ip": "10.0.0.1",
|
|
"public_ip": "35.159.25.34",
|
|
"tags": {
|
|
"Name": "one-aws-instance",
|
|
},
|
|
"tags_all": {
|
|
"Additional": "another-tag"
|
|
},
|
|
"volume_tags": {
|
|
"Ignored": "stuff"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"child_modules": [
|
|
{
|
|
"resources": [
|
|
{
|
|
"address": "aws_instance.host",
|
|
"type": "aws_instance",
|
|
"name": "host",
|
|
"values": {
|
|
"ami": "ami-00000000000000001",
|
|
"id": "i-22222222222222222",
|
|
"private_ip": "10.0.0.2",
|
|
"public_ip": "",
|
|
"tags": {
|
|
"Name": "two-aws-instance"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"address": "module.my-module-two"
|
|
},
|
|
{
|
|
"resources": [
|
|
{
|
|
"address": "aws_instance.host",
|
|
"type": "aws_instance",
|
|
"name": "host",
|
|
"values": {
|
|
"ami": "ami-00000000000000001",
|
|
"id": "i-33333333333333333",
|
|
"private_ip": "10.0.0.3",
|
|
"public_ip": "",
|
|
"tags": {
|
|
"Name": "three-aws-instance"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"address": "module.my-module-three"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|