Skip to content

Instantly share code, notes, and snippets.

@lancejpollard
Last active July 4, 2023 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lancejpollard/1fbf133fdfd2bfcf96a29705ffd2e385 to your computer and use it in GitHub Desktop.
Save lancejpollard/1fbf133fdfd2bfcf96a29705ffd2e385 to your computer and use it in GitHub Desktop.
Example Terraform State File Output (.tfstate)
{
"version": 4,
"terraform_version": "1.5.2",
"serial": 4,
"lineage": "d5d29458-464d-ade8-e0cd-686ea1854a73",
"outputs": {},
"resources": [
{
"mode": "managed",
"type": "google_cloudfunctions_function",
"name": "function",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": []
},
{
"mode": "managed",
"type": "google_cloudfunctions_function_iam_member",
"name": "invoker",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": []
},
{
"mode": "managed",
"type": "google_storage_bucket",
"name": "bucket",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"autoclass": [],
"cors": [],
"custom_placement_config": [],
"default_event_based_hold": false,
"encryption": [],
"force_destroy": false,
"id": "test-bucket-123",
"labels": {},
"lifecycle_rule": [],
"location": "US",
"logging": [],
"name": "test-bucket-123",
"project": "adroit-producer-19283",
"public_access_prevention": "inherited",
"requester_pays": false,
"retention_policy": [],
"self_link": "https://www.googleapis.com/storage/v1/b/test-bucket-123",
"storage_class": "STANDARD",
"timeouts": null,
"uniform_bucket_level_access": false,
"url": "gs://test-bucket-123",
"versioning": [],
"website": []
},
"sensitive_attributes": [],
"private": "..."
}
]
}
],
"check_results": null
}
{
"version": 4,
"terraform_version": "1.5.2",
"serial": 4,
"lineage": "37c1b539-91af-95bf-91f6-3032283df72f",
"outputs": {},
"resources": [
{
"mode": "managed",
"type": "google_storage_bucket",
"name": "static",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"autoclass": [],
"cors": [],
"custom_placement_config": [],
"default_event_based_hold": false,
"encryption": [],
"force_destroy": false,
"id": "randombucket123",
"labels": {},
"lifecycle_rule": [],
"location": "US",
"logging": [],
"name": "randombucket123",
"project": "adroit-producer-192938",
"public_access_prevention": "inherited",
"requester_pays": false,
"retention_policy": [],
"self_link": "https://www.googleapis.com/storage/v1/b/randombucket123",
"storage_class": "STANDARD",
"timeouts": null,
"uniform_bucket_level_access": true,
"url": "gs://randombucket123",
"versioning": [],
"website": []
},
"sensitive_attributes": [],
"private": "..."
}
]
},
{
"mode": "managed",
"type": "google_storage_bucket_object",
"name": "default",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"bucket": "randombucket123",
"cache_control": "",
"content": null,
"content_disposition": "",
"content_encoding": "",
"content_language": "",
"content_type": "text/plain",
"crc32c": "nIZy2A==",
"customer_encryption": [],
"detect_md5hash": "yJfRrQr48sdPuhax21Eeng==",
"event_based_hold": false,
"id": "randombucket123-sample_file.txt",
"kms_key_name": "",
"md5hash": "yJfRrQr48sdPuhax21Eeng==",
"media_link": "https://storage.googleapis.com/download/storage/v1/b/randombucket123/o/sample_file.txt?generation=1687504735646284\u0026alt=media",
"metadata": null,
"name": "sample_file.txt",
"output_name": "sample_file.txt",
"self_link": "https://www.googleapis.com/storage/v1/b/randombucket123/o/sample_file.txt",
"source": "./sample_file.txt",
"storage_class": "STANDARD",
"temporary_hold": false,
"timeouts": null
},
"sensitive_attributes": [],
"private": "...",
"dependencies": [
"google_storage_bucket.static"
]
}
]
}
],
"check_results": null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment