From 0969d37c986c7f372455f2a8ead4df8540b34aad Mon Sep 17 00:00:00 2001 From: Mazin Ahmed Date: Wed, 28 Apr 2021 12:07:55 +0400 Subject: [PATCH] Initial release. --- .gitignore | 5 + LICENSE.md | 21 + README.md | 254 + sample-data/README.md | 6 + .../mock-tfconfig-v2.sentinel | 2261 ++++ .../mock-tfconfig.sentinel | 1559 +++ .../mock-tfplan-v2.sentinel | 9837 +++++++++++++++++ .../mock-tfplan.sentinel | 6639 +++++++++++ .../mock-tfrun.sentinel | 38 + .../mock-tfstate-v2.sentinel | 201 + .../mock-tfstate.sentinel | 222 + .../sentinel.json | 14 + sample-data/terraform-terragoat-aws.tfstate | 1821 +++ setup.py | 13 + tfquery/__init__.py | 4 + tfquery/__main__.py | 72 + tfquery/sql_handler.py | 123 + tfquery/tfstate.py | 118 + tfquery/tfstate_v3_migration.py | 27 + tfquery/utils.py | 36 + 20 files changed, 23271 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 sample-data/README.md create mode 100644 sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfconfig-v2.sentinel create mode 100644 sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfconfig.sentinel create mode 100644 sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfplan-v2.sentinel create mode 100644 sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfplan.sentinel create mode 100644 sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfrun.sentinel create mode 100644 sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfstate-v2.sentinel create mode 100644 sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfstate.sentinel create mode 100644 sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/sentinel.json create mode 100644 sample-data/terraform-terragoat-aws.tfstate create mode 100644 setup.py create mode 100644 tfquery/__init__.py create mode 100644 tfquery/__main__.py create mode 100644 tfquery/sql_handler.py create mode 100644 tfquery/tfstate.py create mode 100644 tfquery/tfstate_v3_migration.py create mode 100644 tfquery/utils.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dfae0fc --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +__pycache__ +internal-tests/ +*.egg-info +build/ +*.egg diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..ce6b025 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Mazin Ahmed + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f5631c --- /dev/null +++ b/README.md @@ -0,0 +1,254 @@ +# 🌩ī¸ tfquery 🌩ī¸ + +## Run SQL queries on your Terraform infrastructure. Ask questions that are hard to answer + +--- + +# 🚀 What is tfquery? + +tfquery is a framework that allows running SQL queries on Terraform code. It's made to analyze your Terraform infrastructure, locate resources, run security compliance checks, spot misconfigured resources, develop CI benchmarks, and much more. + +tfquery is made to help in answering questions that are hard to answer about your infrastructure-as-code. It allows querying resources and analyzing its configuration using a SQL-powered framework. + +# Why? + +infrastructure-as-code is the de-facto today for documenting and deploying infrastructure on cloud providers. As the organization grows, it becomes really hard to understand and analyze the deployed infrastructure. Grepping and searching for researches in Terraform state files is not enough. Terraform Modules are automating processes dynamically for infrastructure deployment, so searching for static resources is also not feasible for good visibility. + +With tfquery, you can run SQL queries on Terraform state files, and gain the best possible visibility. + +--- + +# 💡 Use tfquery to + +- Have full coverage of your infrastructure, without being locked on a specific provider, including Amazon AWS, Microsoft Azure, Google Cloud Platform, Alibaba Cloud, IBM Cloud, Oracle Cloud, and many others. + +- Analyze deployed resources configuration. + +- Develop CI and monitoring checks for cloud infrastructure. + +- Write custom queries to scan Terraform resources. + +--- + +# tfquery vs. Cloud-specific SQL engines? + +There are cloud-specific SQL engines that allow you to run SQL queries to understand resources on their infrastructure, both are covered as provided service by the cloud provider, or given as an open-source tool or a product. The main difference tfquery brings: + +- **Maintainability**: Cloud-specific SQL engines require maintenance in case of new services or breaking changes to existing ones. tfquery make use of Terraform schemas as a standard. tfquery will work on all given services, without the need to continuously update it with new API specs. + +- **Coverage**: tfquery covers all the cloud providers that Terraform supports out of the box (thanks to Terraform Providers). + +--- + +# 📖 Usage + +#### Run SQL query on Terraform states + +```python +>>> import tfquery +>>> +>>> result = tfquery.tfstate.run_query("terraform.tfstate", "select count(*) from resources") +>> print(result) +[{'count(*)': 86}] +``` + +#### Parse all resources from a Terraform state file + +```python +>>> import tfquery +>>> +>>> resources = tfquery.tfstate.parse_resources("terraform.tfstate") +>>> print(f"[i] Resources Count: {len(resources)}") +[i] Resources Count: 1475 +``` + +## Advanced Usage + +### Migrate Version 3 to Version 4 Terraform states + +This is a parsing library to migrate the older Version 3 Terraform states to a Version 4 state. This is made to add backward compatibility for Terraform states that is made for releases older than `Terraform v0.11`. + +```python +>>> import tfquery +>>> +>>> tfstate_v3 = tfquery.tfstate.load_file("terraform.tfstate") +>>> tfstate_v4 = tfquery.tfstate_v3_migration.upgrade_v3_tfstate(tfstate) + +``` + +## 🖲ī¸ Command-Line (`tfquery`) + +TFquery is also available as a CLI tool. It can be used to run SQL queries directly on Terraform states, and for importing resources into persistent storage. + +```shell +mazin@hackbox$> tfquery -h + +usage: tfquery [-h] [--tfstate TFSTATE] [--tfstate-dir TFSTATE_DIR] + [--query QUERY] [--db DB_PATH] [--interactive] [--import] + +tfquery: Run SQL queries on your Terraform infrastructure. + +optional arguments: + -h, --help show this help message and exit + --tfstate TFSTATE Terraform .tfstate file. + --tfstate-dir TFSTATE_DIR + Directory of Terraform .tfstate files, for running queries on + environments. + --query QUERY, -q QUERY + SQL query to execute. + --db DB_PATH DB path (optional. default: temporarily-generated database). + --interactive, -i Interactive mode. + --import Import tfstate into database. +``` + +### Examples + +- **Run SQL query for a directory of multiple Terraform states (for multiple workspaces).**: + +```python +$ tfquery -q 'select count(*) as count from resources;' --tfstate-dir /path/to/terraform-states +[i] DB Path: tfstate.db +[+] Imported 4203 resources from ./prod.tfstate. +[i] DB Path: tfstate.db +[+] Imported 3675 resources from ./nonprod.tfstate. +[i] DB Path: tfstate.db +[+] Imported 463 resources from ./qa.tfstate. +``` + +- **Import Terraform states into Database.**: + +```python +$ python3 tfquery --tfstate /path/to/terraform.state --db tfstate.db --import +[i] DB Path: tfstate.db +[+] Imported 386 resources from terraform.tfstate. +``` + +- **Run queries on imported resources in a database** + +```python +$ tfquery --db tfstate.db -q 'select count(*) as count from resources;' +[ + { + "count": 386 + } +] +``` + +--- + +# 💭 Awesome Queries & Scripts + +**Find all AWS S3 buckets without versioning being enabled** + +```python +import tfquery, sys +results = tfquery.tfstate.run_query(sys.argv[1], "select * from resources where type = 'aws_s3_bucket'") +for result in results: + attributes = result["attributes"] + if 'versioning' not in attributes or len(attributes["versioning"]) == 0: + # print(result) + continue + for versioning in attributes["versioning"]: + if versioning["enabled"] is False: + # print(result) + pass +``` + +**Find all AWS IAM users, and print their ARNs** + +```python +import tfquery, sys +results = tfquery.tfstate.run_query(sys.argv[1], "select json_extract(attributes, '$.arn') as arn from resources where type = 'aws_iam_user';") +for result in results: + print(result["arn"]) +``` + +or + +```python +import tfquery, sys +results = tfquery.tfstate.run_query(sys.argv[1], "select attributes from resources where type = 'aws_iam_user';") +for result in results: + print(result["attributes"]["arn"]) +``` + +**Find all resources in the environment, and show how many instances were deployed** + +```python +import tfquery +results = tfquery.tfstate.run_query("terraform.tfstate", "select type, count(*) as count from resources group by type order BY count desc;") +print(results) +``` + +--- + +# ✨ Interested in tfquery? + +1. **Post a Tweet about the project and tag [`@mazen160`](https://twitter.com/mazen160) 🙏** + +2. **🌟 Star it on Github 🌟** + +3. **Create a PR for a new awesome feature 💛** + +4. **Would like to sponsor the project? Contact me on email!** + +--- + +# đŸ’ģ Contribution + +Contribution is always welcome! Please feel free to report issues on Github and create PRs for new features. + +## 📌 Ideas to Start on + +Would like to contribute to tfquery? Here are some ideas that you may start with: + +- Better documentation: would be great to enhance the documentation with additional examples and queries. + +- CI: Implement CI along with test terraform states for Terragoat. + +- Support dependencies for resources lookup: Create a new table called "dependencies", parse V4 Terraform states, and implement a many-to-one relation for dependencies of resources. + +- More V3 --> V4 migration support: currently V3 resources migrations are supported. Dependencies are not migrated to the new V4 state. It will be great to continue on V3--> V4 support for Terraform states. + +- General validation of Terraform states parser implementation: Validate current implementation of the parser, and enhance it where possible. + +- Connect resources with terraform state base name: For environments with many workspaces, each workspace can have a different name, it would be nice to add a column for terraform state file base name, to help in querying across different workspaces. + +- tfplan parsing: Allow parsing of tfplan files. This can be an opening addition for implementing a new CI security scanner for Terraform deployments. + +- Logo design: a logo design would be great. + +### As you can see, there are many ways to support. Please help us make the project bigger for everyone! + +--- + +# Installation + +```shell + +mazin@hackbox$> git clone https://github.com/mazen160/tfquery.git +mazin@hackbox$> cd tfquery +mazin@hackbox$> python3 setup.py install + +``` + +or + +```shell +mazin@hackbox$> pip install git+https://github.com/mazen160/tfquery +``` + +--- + +# 📄 License + +The project is licensed under MIT License. + +# 💚 Author + +**Mazin Ahmed** + +- **Website**: [https://mazinahmed.net](https://mazinahmed.net) +- **Email**: `mazin [at] mazinahmed [dot] net` +- **Twitter**: [https://twitter.com/mazen160](https://twitter.com/mazen160) +- **Linkedin**: [http://linkedin.com/in/infosecmazinahmed](http://linkedin.com/in/infosecmazinahmed) diff --git a/sample-data/README.md b/sample-data/README.md new file mode 100644 index 0000000..227f203 --- /dev/null +++ b/sample-data/README.md @@ -0,0 +1,6 @@ +# Sample Data for tfquery + +## Sample data for testing tfquery. + +* **terraform-terragoat-aws.tfstate**: Terraform state for file Terragoat AWS environment. +* **terraform-terragoat-aws-tfstate-sentinel-mocks**: Sentinel mocks for Terragoat AWS environment. diff --git a/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfconfig-v2.sentinel b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfconfig-v2.sentinel new file mode 100644 index 0000000..ac46df5 --- /dev/null +++ b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfconfig-v2.sentinel @@ -0,0 +1,2261 @@ +import "strings" + +providers = { + "aws": { + "alias": "", + "config": { + "profile": { + "references": [ + "var.profile", + ], + }, + "region": { + "constant_value": "us-west-1", + }, + }, + "module_address": "", + "name": "aws", + "provider_config_key": "aws", + "version_constraint": "", + }, + "aws.plain_text_access_keys_provider": { + "alias": "plain_text_access_keys_provider", + "config": { + "access_key": { + "constant_value": "{{REDACTED}}", + }, + "region": { + "constant_value": "us-west-1", + }, + "secret_key": { + "constant_value": "{{REDACTED}}", + }, + }, + "module_address": "", + "name": "aws", + "provider_config_key": "aws.plain_text_access_keys_provider", + "version_constraint": "", + }, +} + +resources = { + "aws_db_instance.default": { + "address": "aws_db_instance.default", + "config": { + "allocated_storage": { + "constant_value": "20", + }, + "apply_immediately": { + "constant_value": true, + }, + "backup_retention_period": { + "constant_value": 0, + }, + "db_subnet_group_name": { + "references": [ + "aws_db_subnet_group.default", + ], + }, + "engine": { + "constant_value": "mysql", + }, + "engine_version": { + "constant_value": "8.0", + }, + "identifier": { + "references": [ + "local.resource_prefix", + ], + }, + "instance_class": { + "constant_value": "db.t3.micro", + }, + "monitoring_interval": { + "constant_value": 0, + }, + "multi_az": { + "constant_value": false, + }, + "name": { + "references": [ + "var.dbname", + ], + }, + "option_group_name": { + "references": [ + "aws_db_option_group.default", + ], + }, + "parameter_group_name": { + "references": [ + "aws_db_parameter_group.default", + ], + }, + "password": { + "references": [ + "var.password", + ], + }, + "publicly_accessible": { + "constant_value": true, + }, + "skip_final_snapshot": { + "constant_value": true, + }, + "storage_encrypted": { + "constant_value": false, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "username": { + "constant_value": "admin", + }, + "vpc_security_group_ids": { + "references": [ + "aws_security_group.default", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_db_instance", + }, + "aws_db_option_group.default": { + "address": "aws_db_option_group.default", + "config": { + "engine_name": { + "constant_value": "mysql", + }, + "major_engine_version": { + "constant_value": "8.0", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "option_group_description": { + "constant_value": "Terraform OG", + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_db_option_group", + }, + "aws_db_parameter_group.default": { + "address": "aws_db_parameter_group.default", + "config": { + "description": { + "constant_value": "Terraform PG", + }, + "family": { + "constant_value": "mysql8.0", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "parameter": [ + { + "apply_method": { + "constant_value": "immediate", + }, + "name": { + "constant_value": "character_set_client", + }, + "value": { + "constant_value": "utf8", + }, + }, + { + "apply_method": { + "constant_value": "immediate", + }, + "name": { + "constant_value": "character_set_server", + }, + "value": { + "constant_value": "utf8", + }, + }, + ], + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_db_parameter_group", + }, + "aws_db_subnet_group.default": { + "address": "aws_db_subnet_group.default", + "config": { + "description": { + "constant_value": "Terraform DB Subnet Group", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "subnet_ids": { + "references": [ + "aws_subnet.web_subnet", + "aws_subnet.web_subnet2", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_db_subnet_group", + }, + "aws_ebs_snapshot.example_snapshot": { + "address": "aws_ebs_snapshot.example_snapshot", + "config": { + "description": { + "references": [ + "local.resource_prefix", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "volume_id": { + "references": [ + "aws_ebs_volume.web_host_storage", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "example_snapshot", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_ebs_snapshot", + }, + "aws_ebs_volume.web_host_storage": { + "address": "aws_ebs_volume.web_host_storage", + "config": { + "availability_zone": { + "references": [ + "var.availability_zone", + ], + }, + "size": { + "constant_value": 1, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "web_host_storage", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_ebs_volume", + }, + "aws_ecr_repository.repository": { + "address": "aws_ecr_repository.repository", + "config": { + "image_tag_mutability": { + "constant_value": "MUTABLE", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "repository", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_ecr_repository", + }, + "aws_eks_cluster.eks_cluster": { + "address": "aws_eks_cluster.eks_cluster", + "config": { + "name": { + "references": [ + "local.eks_name", + ], + }, + "role_arn": { + "references": [ + "aws_iam_role.iam_for_eks", + ], + }, + "vpc_config": [ + { + "endpoint_private_access": { + "constant_value": true, + }, + "subnet_ids": { + "references": [ + "aws_subnet.eks_subnet1", + "aws_subnet.eks_subnet2", + ], + }, + }, + ], + }, + "count": {}, + "depends_on": [ + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy", + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy", + ], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "eks_cluster", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_eks_cluster", + }, + "aws_elasticsearch_domain.monitoring-framework": { + "address": "aws_elasticsearch_domain.monitoring-framework", + "config": { + "cluster_config": [ + { + "dedicated_master_count": { + "constant_value": 1, + }, + "dedicated_master_enabled": { + "constant_value": false, + }, + "dedicated_master_type": { + "constant_value": "m4.large.elasticsearch", + }, + "instance_count": { + "constant_value": 1, + }, + "instance_type": { + "constant_value": "t2.small.elasticsearch", + }, + }, + ], + "domain_name": { + "references": [ + "var.environment", + ], + }, + "ebs_options": [ + { + "ebs_enabled": { + "constant_value": true, + }, + "volume_size": { + "constant_value": 30, + }, + }, + ], + "elasticsearch_version": { + "constant_value": "2.3", + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "monitoring-framework", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_elasticsearch_domain", + }, + "aws_elasticsearch_domain_policy.monitoring-framework-policy": { + "address": "aws_elasticsearch_domain_policy.monitoring-framework-policy", + "config": { + "access_policies": { + "references": [ + "data.aws_iam_policy_document.policy", + ], + }, + "domain_name": { + "references": [ + "aws_elasticsearch_domain.monitoring-framework", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "monitoring-framework-policy", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_elasticsearch_domain_policy", + }, + "aws_elb.weblb": { + "address": "aws_elb.weblb", + "config": { + "connection_draining": { + "constant_value": true, + }, + "connection_draining_timeout": { + "constant_value": 400, + }, + "cross_zone_load_balancing": { + "constant_value": true, + }, + "health_check": [ + { + "healthy_threshold": { + "constant_value": 2, + }, + "interval": { + "constant_value": 30, + }, + "target": { + "constant_value": "HTTP:8000/", + }, + "timeout": { + "constant_value": 3, + }, + "unhealthy_threshold": { + "constant_value": 2, + }, + }, + ], + "idle_timeout": { + "constant_value": 400, + }, + "instances": { + "references": [ + "aws_instance.web_host", + ], + }, + "listener": [ + { + "instance_port": { + "constant_value": 8000, + }, + "instance_protocol": { + "constant_value": "http", + }, + "lb_port": { + "constant_value": 80, + }, + "lb_protocol": { + "constant_value": "http", + }, + }, + ], + "name": { + "constant_value": "weblb-terraform-elb", + }, + "security_groups": { + "references": [ + "aws_security_group.web-node", + ], + }, + "subnets": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + "tags": { + "constant_value": { + "Name": "foobar-terraform-elb", + }, + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "weblb", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_elb", + }, + "aws_flow_log.vpcflowlogs": { + "address": "aws_flow_log.vpcflowlogs", + "config": { + "log_destination": { + "references": [ + "aws_s3_bucket.flowbucket", + ], + }, + "log_destination_type": { + "constant_value": "s3", + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "traffic_type": { + "constant_value": "ALL", + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "vpcflowlogs", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_flow_log", + }, + "aws_iam_access_key.user": { + "address": "aws_iam_access_key.user", + "config": { + "user": { + "references": [ + "aws_iam_user.user", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "user", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_access_key", + }, + "aws_iam_instance_profile.ec2profile": { + "address": "aws_iam_instance_profile.ec2profile", + "config": { + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "role": { + "references": [ + "aws_iam_role.ec2role", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "ec2profile", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_instance_profile", + }, + "aws_iam_role.ec2role": { + "address": "aws_iam_role.ec2role", + "config": { + "assume_role_policy": { + "constant_value": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "path": { + "constant_value": "/", + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "ec2role", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_role", + }, + "aws_iam_role.iam_for_eks": { + "address": "aws_iam_role.iam_for_eks", + "config": { + "assume_role_policy": { + "references": [ + "data.aws_iam_policy_document.iam_policy_eks", + ], + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "iam_for_eks", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_role", + }, + "aws_iam_role.iam_for_lambda": { + "address": "aws_iam_role.iam_for_lambda", + "config": { + "assume_role_policy": { + "constant_value": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "iam_for_lambda", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_role", + }, + "aws_iam_role_policy.ec2policy": { + "address": "aws_iam_role_policy.ec2policy", + "config": { + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "policy": { + "constant_value": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + "role": { + "references": [ + "aws_iam_role.ec2role", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "ec2policy", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_role_policy", + }, + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy": { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy", + "config": { + "policy_arn": { + "constant_value": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + }, + "role": { + "references": [ + "aws_iam_role.iam_for_eks", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "policy_attachment-AmazonEKSClusterPolicy", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_role_policy_attachment", + }, + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy": { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy", + "config": { + "policy_arn": { + "constant_value": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + }, + "role": { + "references": [ + "aws_iam_role.iam_for_eks", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "policy_attachment-AmazonEKSServicePolicy", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_role_policy_attachment", + }, + "aws_iam_user.user": { + "address": "aws_iam_user.user", + "config": { + "force_destroy": { + "constant_value": true, + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "user", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_user", + }, + "aws_iam_user_policy.userpolicy": { + "address": "aws_iam_user_policy.userpolicy", + "config": { + "name": { + "constant_value": "excess_policy", + }, + "policy": { + "constant_value": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + "user": { + "references": [ + "aws_iam_user.user", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "userpolicy", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_user_policy", + }, + "aws_instance.db_app": { + "address": "aws_instance.db_app", + "config": { + "ami": { + "references": [ + "data.aws_ami.amazon-linux-2", + ], + }, + "iam_instance_profile": { + "references": [ + "aws_iam_instance_profile.ec2profile", + ], + }, + "instance_type": { + "constant_value": "t2.nano", + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "user_data": { + "references": [ + "aws_db_instance.default", + "aws_db_instance.default", + "var.password", + "aws_db_instance.default", + ], + }, + "vpc_security_group_ids": { + "references": [ + "aws_security_group.web-node", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "db_app", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_instance", + }, + "aws_instance.web_host": { + "address": "aws_instance.web_host", + "config": { + "ami": { + "references": [ + "var.ami", + ], + }, + "instance_type": { + "constant_value": "t2.nano", + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "user_data": { + "constant_value": "#! /bin/bash\nsudo apt-get update\nsudo apt-get install -y apache2\nsudo systemctl start apache2\nsudo systemctl enable apache2\nexport AWS_ACCESS_KEY_ID={{REDACTED}}\nexport AWS_SECRET_ACCESS_KEY={{REDACTED}}\nexport AWS_DEFAULT_REGION=us-west-2\necho \"

Deployed via Terraform

\" | sudo tee /var/www/html/index.html\n", + }, + "vpc_security_group_ids": { + "references": [ + "aws_security_group.web-node", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "web_host", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_instance", + }, + "aws_internet_gateway.web_igw": { + "address": "aws_internet_gateway.web_igw", + "config": { + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "web_igw", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_internet_gateway", + }, + "aws_kms_alias.logs_key_alias": { + "address": "aws_kms_alias.logs_key_alias", + "config": { + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "target_key_id": { + "references": [ + "aws_kms_key.logs_key", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "logs_key_alias", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_kms_alias", + }, + "aws_kms_key.logs_key": { + "address": "aws_kms_key.logs_key", + "config": { + "deletion_window_in_days": { + "constant_value": 7, + }, + "description": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "logs_key", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_kms_key", + }, + "aws_lambda_function.analysis_lambda": { + "address": "aws_lambda_function.analysis_lambda", + "config": { + "environment": [ + { + "variables": { + "constant_value": { + "access_key": "{{REDACTED}}", + "secret_key": "{{REDACTED}}", + }, + }, + }, + ], + "filename": { + "constant_value": "resources/lambda_function_payload.zip", + }, + "function_name": { + "references": [ + "local.resource_prefix", + ], + }, + "handler": { + "constant_value": "exports.test", + }, + "role": { + "references": [ + "aws_iam_role.iam_for_lambda", + ], + }, + "runtime": { + "constant_value": "nodejs12.x", + }, + "source_code_hash": { + "constant_value": null, + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "analysis_lambda", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_lambda_function", + }, + "aws_neptune_cluster.default": { + "address": "aws_neptune_cluster.default", + "config": { + "apply_immediately": { + "constant_value": true, + }, + "backup_retention_period": { + "constant_value": 5, + }, + "cluster_identifier": { + "references": [ + "var.neptune-dbname", + ], + }, + "engine": { + "constant_value": "neptune", + }, + "iam_database_authentication_enabled": { + "constant_value": false, + }, + "preferred_backup_window": { + "constant_value": "07:00-09:00", + }, + "skip_final_snapshot": { + "constant_value": true, + }, + "storage_encrypted": { + "constant_value": false, + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_neptune_cluster", + }, + "aws_neptune_cluster_instance.default": { + "address": "aws_neptune_cluster_instance.default", + "config": { + "apply_immediately": { + "constant_value": true, + }, + "cluster_identifier": { + "references": [ + "aws_neptune_cluster.default", + ], + }, + "engine": { + "constant_value": "neptune", + }, + "instance_class": { + "constant_value": "db.t3.medium", + }, + }, + "count": { + "constant_value": 1, + }, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_neptune_cluster_instance", + }, + "aws_neptune_cluster_snapshot.default": { + "address": "aws_neptune_cluster_snapshot.default", + "config": { + "db_cluster_identifier": { + "references": [ + "aws_neptune_cluster.default", + ], + }, + "db_cluster_snapshot_identifier": { + "constant_value": "resourcetestsnapshot1", + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_neptune_cluster_snapshot", + }, + "aws_network_interface.web-eni": { + "address": "aws_network_interface.web-eni", + "config": { + "private_ips": { + "constant_value": [ + "172.16.10.100", + ], + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "web-eni", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_network_interface", + }, + "aws_route.public_internet_gateway": { + "address": "aws_route.public_internet_gateway", + "config": { + "destination_cidr_block": { + "constant_value": "0.0.0.0/0", + }, + "gateway_id": { + "references": [ + "aws_internet_gateway.web_igw", + ], + }, + "route_table_id": { + "references": [ + "aws_route_table.web_rtb", + ], + }, + "timeouts": { + "constant_value": null, + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "public_internet_gateway", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_route", + }, + "aws_route_table.web_rtb": { + "address": "aws_route_table.web_rtb", + "config": { + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "web_rtb", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_route_table", + }, + "aws_route_table_association.rtbassoc": { + "address": "aws_route_table_association.rtbassoc", + "config": { + "route_table_id": { + "references": [ + "aws_route_table.web_rtb", + ], + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "rtbassoc", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_route_table_association", + }, + "aws_route_table_association.rtbassoc2": { + "address": "aws_route_table_association.rtbassoc2", + "config": { + "route_table_id": { + "references": [ + "aws_route_table.web_rtb", + ], + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet2", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "rtbassoc2", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_route_table_association", + }, + "aws_s3_bucket.data": { + "address": "aws_s3_bucket.data", + "config": { + "acl": { + "constant_value": "public-read", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "data", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.data_science": { + "address": "aws_s3_bucket.data_science", + "config": { + "acl": { + "constant_value": "private", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "logging": [ + { + "target_bucket": { + "references": [ + "aws_s3_bucket.logs", + ], + }, + "target_prefix": { + "constant_value": "log/", + }, + }, + ], + "versioning": [ + { + "enabled": { + "constant_value": true, + }, + }, + ], + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "data_science", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.financials": { + "address": "aws_s3_bucket.financials", + "config": { + "acl": { + "constant_value": "private", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "financials", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.flowbucket": { + "address": "aws_s3_bucket.flowbucket", + "config": { + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "flowbucket", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.logs": { + "address": "aws_s3_bucket.logs", + "config": { + "acl": { + "constant_value": "log-delivery-write", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "kms_master_key_id": { + "references": [ + "aws_kms_key.logs_key", + ], + }, + "sse_algorithm": { + "constant_value": "aws:kms", + }, + }, + ], + }, + ], + }, + ], + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "versioning": [ + { + "enabled": { + "constant_value": true, + }, + }, + ], + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "logs", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.operations": { + "address": "aws_s3_bucket.operations", + "config": { + "acl": { + "constant_value": "private", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "versioning": [ + { + "enabled": { + "constant_value": true, + }, + }, + ], + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "operations", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_s3_bucket", + }, + "aws_s3_bucket_object.data_object": { + "address": "aws_s3_bucket_object.data_object", + "config": { + "bucket": { + "references": [ + "aws_s3_bucket.data", + ], + }, + "key": { + "constant_value": "customer-master.xlsx", + }, + "source": { + "constant_value": "resources/customer-master.xlsx", + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "data_object", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_s3_bucket_object", + }, + "aws_security_group.default": { + "address": "aws_security_group.default", + "config": { + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_security_group", + }, + "aws_security_group.web-node": { + "address": "aws_security_group.web-node", + "config": { + "description": { + "references": [ + "local.resource_prefix", + ], + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "count": {}, + "depends_on": [ + "aws_vpc.web_vpc", + ], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "web-node", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_security_group", + }, + "aws_security_group_rule.egress": { + "address": "aws_security_group_rule.egress", + "config": { + "cidr_blocks": { + "constant_value": [ + "0.0.0.0/0", + ], + }, + "from_port": { + "constant_value": 0, + }, + "protocol": { + "constant_value": "-1", + }, + "security_group_id": { + "references": [ + "aws_security_group.default", + ], + }, + "to_port": { + "constant_value": 0, + }, + "type": { + "constant_value": "egress", + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "egress", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_security_group_rule", + }, + "aws_security_group_rule.ingress": { + "address": "aws_security_group_rule.ingress", + "config": { + "cidr_blocks": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + "from_port": { + "constant_value": "3306", + }, + "protocol": { + "constant_value": "tcp", + }, + "security_group_id": { + "references": [ + "aws_security_group.default", + ], + }, + "to_port": { + "constant_value": "3306", + }, + "type": { + "constant_value": "ingress", + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "ingress", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_security_group_rule", + }, + "aws_subnet.eks_subnet1": { + "address": "aws_subnet.eks_subnet1", + "config": { + "availability_zone": { + "references": [ + "var.availability_zone", + ], + }, + "cidr_block": { + "constant_value": "10.10.10.0/24", + }, + "map_public_ip_on_launch": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.eks_name", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.eks_vpc", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "eks_subnet1", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_subnet", + }, + "aws_subnet.eks_subnet2": { + "address": "aws_subnet.eks_subnet2", + "config": { + "availability_zone": { + "references": [ + "var.availability_zone2", + ], + }, + "cidr_block": { + "constant_value": "10.10.11.0/24", + }, + "map_public_ip_on_launch": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.eks_name", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.eks_vpc", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "eks_subnet2", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_subnet", + }, + "aws_subnet.web_subnet": { + "address": "aws_subnet.web_subnet", + "config": { + "availability_zone": { + "references": [ + "var.availability_zone", + ], + }, + "cidr_block": { + "constant_value": "172.16.10.0/24", + }, + "map_public_ip_on_launch": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "web_subnet", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_subnet", + }, + "aws_subnet.web_subnet2": { + "address": "aws_subnet.web_subnet2", + "config": { + "availability_zone": { + "references": [ + "var.availability_zone2", + ], + }, + "cidr_block": { + "constant_value": "172.16.11.0/24", + }, + "map_public_ip_on_launch": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "web_subnet2", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_subnet", + }, + "aws_volume_attachment.ebs_att": { + "address": "aws_volume_attachment.ebs_att", + "config": { + "device_name": { + "constant_value": "/dev/sdh", + }, + "instance_id": { + "references": [ + "aws_instance.web_host", + ], + }, + "volume_id": { + "references": [ + "aws_ebs_volume.web_host_storage", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "ebs_att", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_volume_attachment", + }, + "aws_vpc.eks_vpc": { + "address": "aws_vpc.eks_vpc", + "config": { + "cidr_block": { + "constant_value": "10.10.0.0/16", + }, + "enable_dns_hostnames": { + "constant_value": true, + }, + "enable_dns_support": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "eks_vpc", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_vpc", + }, + "aws_vpc.web_vpc": { + "address": "aws_vpc.web_vpc", + "config": { + "cidr_block": { + "constant_value": "172.16.0.0/16", + }, + "enable_dns_hostnames": { + "constant_value": true, + }, + "enable_dns_support": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "web_vpc", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_vpc", + }, + "data.aws_ami.amazon-linux-2": { + "address": "data.aws_ami.amazon-linux-2", + "config": { + "filter": [ + { + "name": { + "constant_value": "owner-alias", + }, + "values": { + "constant_value": [ + "amazon", + ], + }, + }, + { + "name": { + "constant_value": "name", + }, + "values": { + "constant_value": [ + "amzn2-ami-hvm-*-x86_64-ebs", + ], + }, + }, + ], + "most_recent": { + "constant_value": true, + }, + "owners": { + "constant_value": [ + "amazon", + ], + }, + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "data", + "module_address": "", + "name": "amazon-linux-2", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_ami", + }, + "data.aws_caller_identity.current": { + "address": "data.aws_caller_identity.current", + "config": {}, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "data", + "module_address": "", + "name": "current", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_caller_identity", + }, + "data.aws_iam_policy_document.iam_policy_eks": { + "address": "data.aws_iam_policy_document.iam_policy_eks", + "config": { + "statement": [ + { + "actions": { + "constant_value": [ + "sts:AssumeRole", + ], + }, + "effect": { + "constant_value": "Allow", + }, + "principals": [ + { + "identifiers": { + "constant_value": [ + "eks.amazonaws.com", + ], + }, + "type": { + "constant_value": "Service", + }, + }, + ], + }, + ], + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "data", + "module_address": "", + "name": "iam_policy_eks", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_policy_document", + }, + "data.aws_iam_policy_document.policy": { + "address": "data.aws_iam_policy_document.policy", + "config": { + "statement": [ + { + "actions": { + "constant_value": [ + "es:*", + ], + }, + "principals": [ + { + "identifiers": { + "constant_value": [ + "*", + ], + }, + "type": { + "constant_value": "AWS", + }, + }, + ], + "resources": { + "constant_value": [ + "*", + ], + }, + }, + ], + }, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "data", + "module_address": "", + "name": "policy", + "provider_config_key": "aws", + "provisioners": [], + "type": "aws_iam_policy_document", + }, + "null_resource.push_image": { + "address": "null_resource.push_image", + "config": {}, + "count": {}, + "depends_on": [], + "for_each": {}, + "mode": "managed", + "module_address": "", + "name": "push_image", + "provider_config_key": "null", + "provisioners": [ + { + "config": { + "command": { + "references": [ + "var.region", + "data.aws_caller_identity.current", + "var.region", + "aws_ecr_repository.repository", + "aws_ecr_repository.repository", + "local.docker_image", + "local.docker_image", + ], + }, + "working_dir": { + "references": [ + "path.module", + ], + }, + }, + "index": 0, + "resource_address": "null_resource.push_image", + "type": "local-exec", + }, + ], + "type": "null_resource", + }, +} + +provisioners = { + "null_resource.push_image:0": { + "config": { + "command": { + "references": [ + "var.region", + "data.aws_caller_identity.current", + "var.region", + "aws_ecr_repository.repository", + "aws_ecr_repository.repository", + "local.docker_image", + "local.docker_image", + ], + }, + "working_dir": { + "references": [ + "path.module", + ], + }, + }, + "index": 0, + "resource_address": "null_resource.push_image", + "type": "local-exec", + }, +} + +variables = { + "ami": { + "default": "ami-09a5b0b7edf08843d", + "description": "", + "module_address": "", + "name": "ami", + }, + "availability_zone": { + "default": "us-west-2a", + "description": "", + "module_address": "", + "name": "availability_zone", + }, + "availability_zone2": { + "default": "us-west-2b", + "description": "", + "module_address": "", + "name": "availability_zone2", + }, + "company_name": { + "default": "acme", + "description": "", + "module_address": "", + "name": "company_name", + }, + "dbname": { + "default": "db1", + "description": "Name of the Database", + "module_address": "", + "name": "dbname", + }, + "environment": { + "default": "dev", + "description": "", + "module_address": "", + "name": "environment", + }, + "neptune-dbname": { + "default": "neptunedb1", + "description": "Name of the Neptune graph database", + "module_address": "", + "name": "neptune-dbname", + }, + "password": { + "default": "Aa1234321Bb", + "description": "Database password", + "module_address": "", + "name": "password", + }, + "profile": { + "default": "default", + "description": "", + "module_address": "", + "name": "profile", + }, + "region": { + "default": "us-west-2", + "description": "", + "module_address": "", + "name": "region", + }, +} + +outputs = { + "db_app_public_dns": { + "depends_on": [], + "description": "DB Public DNS name", + "module_address": "", + "name": "db_app_public_dns", + "sensitive": false, + "value": { + "references": [ + "aws_instance.db_app", + ], + }, + }, + "db_endpoint": { + "depends_on": [], + "description": "DB Endpoint", + "module_address": "", + "name": "db_endpoint", + "sensitive": false, + "value": { + "references": [ + "aws_db_instance.default", + ], + }, + }, + "ec2_public_dns": { + "depends_on": [], + "description": "Web Host Public DNS name", + "module_address": "", + "name": "ec2_public_dns", + "sensitive": false, + "value": { + "references": [ + "aws_instance.web_host", + ], + }, + }, + "endpoint": { + "depends_on": [], + "description": "", + "module_address": "", + "name": "endpoint", + "sensitive": false, + "value": { + "references": [ + "aws_eks_cluster.eks_cluster", + ], + }, + }, + "kubeconfig-certificate-authority-data": { + "depends_on": [], + "description": "", + "module_address": "", + "name": "kubeconfig-certificate-authority-data", + "sensitive": false, + "value": { + "references": [ + "aws_eks_cluster.eks_cluster", + ], + }, + }, + "public_subnet": { + "depends_on": [], + "description": "The ID of the Public subnet", + "module_address": "", + "name": "public_subnet", + "sensitive": false, + "value": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + }, + "public_subnet2": { + "depends_on": [], + "description": "The ID of the Public subnet", + "module_address": "", + "name": "public_subnet2", + "sensitive": false, + "value": { + "references": [ + "aws_subnet.web_subnet2", + ], + }, + }, + "secret": { + "depends_on": [], + "description": "", + "module_address": "", + "name": "secret", + "sensitive": false, + "value": { + "references": [ + "aws_iam_access_key.user", + ], + }, + }, + "username": { + "depends_on": [], + "description": "", + "module_address": "", + "name": "username", + "sensitive": false, + "value": { + "references": [ + "aws_iam_user.user", + ], + }, + }, + "vpc_id": { + "depends_on": [], + "description": "The ID of the VPC", + "module_address": "", + "name": "vpc_id", + "sensitive": false, + "value": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, +} + +module_calls = {} + +strip_index = func(addr) { + s = strings.split(addr, ".") + for s as i, v { + s[i] = strings.split(v, "[")[0] + } + + return strings.join(s, ".") +} diff --git a/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfconfig.sentinel b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfconfig.sentinel new file mode 100644 index 0000000..4ed101c --- /dev/null +++ b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfconfig.sentinel @@ -0,0 +1,1559 @@ +import "strings" +import "types" + +_modules = { + "root": { + "data": { + "aws_ami": { + "amazon-linux-2": { + "config": { + "filter": [ + { + "name": "owner-alias", + "values": [ + "amazon", + ], + }, + { + "name": "name", + "values": [ + "amzn2-ami-hvm-*-x86_64-ebs", + ], + }, + ], + "most_recent": true, + "owners": [ + "amazon", + ], + }, + "provisioners": null, + "references": { + "filter": [ + { + "name": [], + "values": [], + }, + { + "name": [], + "values": [], + }, + ], + "most_recent": [], + "owners": [], + }, + }, + }, + "aws_caller_identity": { + "current": { + "config": {}, + "provisioners": null, + "references": {}, + }, + }, + "aws_iam_policy_document": { + "iam_policy_eks": { + "config": { + "statement": [ + { + "actions": [ + "sts:AssumeRole", + ], + "effect": "Allow", + "principals": [ + { + "identifiers": [ + "eks.amazonaws.com", + ], + "type": "Service", + }, + ], + }, + ], + }, + "provisioners": null, + "references": { + "statement": [ + { + "actions": [], + "effect": [], + "principals": [ + { + "identifiers": [], + "type": [], + }, + ], + }, + ], + }, + }, + "policy": { + "config": { + "statement": [ + { + "actions": [ + "es:*", + ], + "principals": [ + { + "identifiers": [ + "*", + ], + "type": "AWS", + }, + ], + "resources": [ + "*", + ], + }, + ], + }, + "provisioners": null, + "references": { + "statement": [ + { + "actions": [], + "principals": [ + { + "identifiers": [], + "type": [], + }, + ], + "resources": [], + }, + ], + }, + }, + }, + }, + "modules": {}, + "outputs": { + "db_app_public_dns": { + "depends_on": [], + "description": "DB Public DNS name", + "references": [ + "aws_instance.db_app", + ], + "sensitive": false, + "value": undefined, + }, + "db_endpoint": { + "depends_on": [], + "description": "DB Endpoint", + "references": [ + "aws_db_instance.default", + ], + "sensitive": false, + "value": undefined, + }, + "ec2_public_dns": { + "depends_on": [], + "description": "Web Host Public DNS name", + "references": [ + "aws_instance.web_host", + ], + "sensitive": false, + "value": undefined, + }, + "endpoint": { + "depends_on": [], + "description": "", + "references": [ + "aws_eks_cluster.eks_cluster", + ], + "sensitive": false, + "value": undefined, + }, + "kubeconfig-certificate-authority-data": { + "depends_on": [], + "description": "", + "references": [ + "aws_eks_cluster.eks_cluster", + ], + "sensitive": false, + "value": undefined, + }, + "public_subnet": { + "depends_on": [], + "description": "The ID of the Public subnet", + "references": [ + "aws_subnet.web_subnet", + ], + "sensitive": false, + "value": undefined, + }, + "public_subnet2": { + "depends_on": [], + "description": "The ID of the Public subnet", + "references": [ + "aws_subnet.web_subnet2", + ], + "sensitive": false, + "value": undefined, + }, + "secret": { + "depends_on": [], + "description": "", + "references": [ + "aws_iam_access_key.user", + ], + "sensitive": false, + "value": undefined, + }, + "username": { + "depends_on": [], + "description": "", + "references": [ + "aws_iam_user.user", + ], + "sensitive": false, + "value": undefined, + }, + "vpc_id": { + "depends_on": [], + "description": "The ID of the VPC", + "references": [ + "aws_vpc.web_vpc", + ], + "sensitive": false, + "value": undefined, + }, + }, + "providers": { + "aws": { + "alias": { + "": { + "config": { + "region": "us-west-1", + }, + "references": { + "profile": [ + "var.profile", + ], + "region": [], + }, + "version": "", + }, + "plain_text_access_keys_provider": { + "config": { + "access_key": "{{REDACTED}}", + "region": "us-west-1", + "secret_key": "{{REDACTED}}", + }, + "references": { + "access_key": [], + "region": [], + "secret_key": [], + }, + "version": "", + }, + }, + "config": { + "region": "us-west-1", + }, + "references": { + "profile": [ + "var.profile", + ], + "region": [], + }, + "version": "", + }, + }, + "resources": { + "aws_db_instance": { + "default": { + "config": { + "allocated_storage": "20", + "apply_immediately": true, + "backup_retention_period": 0, + "engine": "mysql", + "engine_version": "8.0", + "instance_class": "db.t3.micro", + "monitoring_interval": 0, + "multi_az": false, + "publicly_accessible": true, + "skip_final_snapshot": true, + "storage_encrypted": false, + "username": "admin", + }, + "provisioners": null, + "references": { + "allocated_storage": [], + "apply_immediately": [], + "backup_retention_period": [], + "db_subnet_group_name": [ + "aws_db_subnet_group.default", + ], + "engine": [], + "engine_version": [], + "identifier": [ + "local.resource_prefix", + ], + "instance_class": [], + "monitoring_interval": [], + "multi_az": [], + "name": [ + "var.dbname", + ], + "option_group_name": [ + "aws_db_option_group.default", + ], + "parameter_group_name": [ + "aws_db_parameter_group.default", + ], + "password": [ + "var.password", + ], + "publicly_accessible": [], + "skip_final_snapshot": [], + "storage_encrypted": [], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + "username": [], + "vpc_security_group_ids": [ + "aws_security_group.default", + ], + }, + }, + }, + "aws_db_option_group": { + "default": { + "config": { + "engine_name": "mysql", + "major_engine_version": "8.0", + "option_group_description": "Terraform OG", + }, + "provisioners": null, + "references": { + "engine_name": [], + "major_engine_version": [], + "name": [ + "local.resource_prefix", + ], + "option_group_description": [], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + }, + "aws_db_parameter_group": { + "default": { + "config": { + "description": "Terraform PG", + "family": "mysql8.0", + "parameter": [ + { + "apply_method": "immediate", + "name": "character_set_client", + "value": "utf8", + }, + { + "apply_method": "immediate", + "name": "character_set_server", + "value": "utf8", + }, + ], + }, + "provisioners": null, + "references": { + "description": [], + "family": [], + "name": [ + "local.resource_prefix", + ], + "parameter": [ + { + "apply_method": [], + "name": [], + "value": [], + }, + { + "apply_method": [], + "name": [], + "value": [], + }, + ], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + }, + "aws_db_subnet_group": { + "default": { + "config": { + "description": "Terraform DB Subnet Group", + }, + "provisioners": null, + "references": { + "description": [], + "name": [ + "local.resource_prefix", + ], + "subnet_ids": [ + "aws_subnet.web_subnet", + "aws_subnet.web_subnet2", + ], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + }, + "aws_ebs_snapshot": { + "example_snapshot": { + "config": {}, + "provisioners": null, + "references": { + "description": [ + "local.resource_prefix", + ], + "tags": [ + "local.resource_prefix", + ], + "volume_id": [ + "aws_ebs_volume.web_host_storage", + ], + }, + }, + }, + "aws_ebs_volume": { + "web_host_storage": { + "config": { + "size": 1, + }, + "provisioners": null, + "references": { + "availability_zone": [ + "var.availability_zone", + ], + "size": [], + "tags": [ + "local.resource_prefix", + ], + }, + }, + }, + "aws_ecr_repository": { + "repository": { + "config": { + "image_tag_mutability": "MUTABLE", + }, + "provisioners": null, + "references": { + "image_tag_mutability": [], + "name": [ + "local.resource_prefix", + ], + "tags": [ + "local.resource_prefix", + ], + }, + }, + }, + "aws_eks_cluster": { + "eks_cluster": { + "config": { + "vpc_config": [ + { + "endpoint_private_access": true, + }, + ], + }, + "provisioners": null, + "references": { + "name": [ + "local.eks_name", + ], + "role_arn": [ + "aws_iam_role.iam_for_eks", + ], + "vpc_config": [ + { + "endpoint_private_access": [], + "subnet_ids": [ + "aws_subnet.eks_subnet1", + "aws_subnet.eks_subnet2", + ], + }, + ], + }, + }, + }, + "aws_elasticsearch_domain": { + "monitoring-framework": { + "config": { + "cluster_config": [ + { + "dedicated_master_count": 1, + "dedicated_master_enabled": false, + "dedicated_master_type": "m4.large.elasticsearch", + "instance_count": 1, + "instance_type": "t2.small.elasticsearch", + }, + ], + "ebs_options": [ + { + "ebs_enabled": true, + "volume_size": 30, + }, + ], + "elasticsearch_version": "2.3", + }, + "provisioners": null, + "references": { + "cluster_config": [ + { + "dedicated_master_count": [], + "dedicated_master_enabled": [], + "dedicated_master_type": [], + "instance_count": [], + "instance_type": [], + }, + ], + "domain_name": [ + "var.environment", + ], + "ebs_options": [ + { + "ebs_enabled": [], + "volume_size": [], + }, + ], + "elasticsearch_version": [], + }, + }, + }, + "aws_elasticsearch_domain_policy": { + "monitoring-framework-policy": { + "config": {}, + "provisioners": null, + "references": { + "access_policies": [ + "data.aws_iam_policy_document.policy", + ], + "domain_name": [ + "aws_elasticsearch_domain.monitoring-framework", + ], + }, + }, + }, + "aws_elb": { + "weblb": { + "config": { + "connection_draining": true, + "connection_draining_timeout": 400, + "cross_zone_load_balancing": true, + "health_check": [ + { + "healthy_threshold": 2, + "interval": 30, + "target": "HTTP:8000/", + "timeout": 3, + "unhealthy_threshold": 2, + }, + ], + "idle_timeout": 400, + "listener": [ + { + "instance_port": 8000, + "instance_protocol": "http", + "lb_port": 80, + "lb_protocol": "http", + }, + ], + "name": "weblb-terraform-elb", + "tags": { + "Name": "foobar-terraform-elb", + }, + }, + "provisioners": null, + "references": { + "connection_draining": [], + "connection_draining_timeout": [], + "cross_zone_load_balancing": [], + "health_check": [ + { + "healthy_threshold": [], + "interval": [], + "target": [], + "timeout": [], + "unhealthy_threshold": [], + }, + ], + "idle_timeout": [], + "instances": [ + "aws_instance.web_host", + ], + "listener": [ + { + "instance_port": [], + "instance_protocol": [], + "lb_port": [], + "lb_protocol": [], + }, + ], + "name": [], + "security_groups": [ + "aws_security_group.web-node", + ], + "subnets": [ + "aws_subnet.web_subnet", + ], + "tags": [], + }, + }, + }, + "aws_flow_log": { + "vpcflowlogs": { + "config": { + "log_destination_type": "s3", + "traffic_type": "ALL", + }, + "provisioners": null, + "references": { + "log_destination": [ + "aws_s3_bucket.flowbucket", + ], + "log_destination_type": [], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + "traffic_type": [], + "vpc_id": [ + "aws_vpc.web_vpc", + ], + }, + }, + }, + "aws_iam_access_key": { + "user": { + "config": {}, + "provisioners": null, + "references": { + "user": [ + "aws_iam_user.user", + ], + }, + }, + }, + "aws_iam_instance_profile": { + "ec2profile": { + "config": {}, + "provisioners": null, + "references": { + "name": [ + "local.resource_prefix", + ], + "role": [ + "aws_iam_role.ec2role", + ], + }, + }, + }, + "aws_iam_role": { + "ec2role": { + "config": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "path": "/", + }, + "provisioners": null, + "references": { + "assume_role_policy": [], + "name": [ + "local.resource_prefix", + ], + "path": [], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "iam_for_eks": { + "config": {}, + "provisioners": null, + "references": { + "assume_role_policy": [ + "data.aws_iam_policy_document.iam_policy_eks", + ], + "name": [ + "local.resource_prefix", + ], + }, + }, + "iam_for_lambda": { + "config": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + }, + "provisioners": null, + "references": { + "assume_role_policy": [], + "name": [ + "local.resource_prefix", + ], + }, + }, + }, + "aws_iam_role_policy": { + "ec2policy": { + "config": { + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + "provisioners": null, + "references": { + "name": [ + "local.resource_prefix", + ], + "policy": [], + "role": [ + "aws_iam_role.ec2role", + ], + }, + }, + }, + "aws_iam_role_policy_attachment": { + "policy_attachment-AmazonEKSClusterPolicy": { + "config": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + }, + "provisioners": null, + "references": { + "policy_arn": [], + "role": [ + "aws_iam_role.iam_for_eks", + ], + }, + }, + "policy_attachment-AmazonEKSServicePolicy": { + "config": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + }, + "provisioners": null, + "references": { + "policy_arn": [], + "role": [ + "aws_iam_role.iam_for_eks", + ], + }, + }, + }, + "aws_iam_user": { + "user": { + "config": { + "force_destroy": true, + }, + "provisioners": null, + "references": { + "force_destroy": [], + "name": [ + "local.resource_prefix", + ], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + }, + "aws_iam_user_policy": { + "userpolicy": { + "config": { + "name": "excess_policy", + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + "provisioners": null, + "references": { + "name": [], + "policy": [], + "user": [ + "aws_iam_user.user", + ], + }, + }, + }, + "aws_instance": { + "db_app": { + "config": { + "instance_type": "t2.nano", + }, + "provisioners": null, + "references": { + "ami": [ + "data.aws_ami.amazon-linux-2", + ], + "iam_instance_profile": [ + "aws_iam_instance_profile.ec2profile", + ], + "instance_type": [], + "subnet_id": [ + "aws_subnet.web_subnet", + ], + "tags": [ + "local.resource_prefix", + ], + "user_data": [ + "aws_db_instance.default", + "aws_db_instance.default", + "var.password", + "aws_db_instance.default", + ], + "vpc_security_group_ids": [ + "aws_security_group.web-node", + ], + }, + }, + "web_host": { + "config": { + "instance_type": "t2.nano", + "user_data": "#! /bin/bash\nsudo apt-get update\nsudo apt-get install -y apache2\nsudo systemctl start apache2\nsudo systemctl enable apache2\nexport AWS_ACCESS_KEY_ID={{REDACTED}}\nexport AWS_SECRET_ACCESS_KEY={{REDACTED}}\nexport AWS_DEFAULT_REGION=us-west-2\necho \"

Deployed via Terraform

\" | sudo tee /var/www/html/index.html\n", + }, + "provisioners": null, + "references": { + "ami": [ + "var.ami", + ], + "instance_type": [], + "subnet_id": [ + "aws_subnet.web_subnet", + ], + "tags": [ + "local.resource_prefix", + ], + "user_data": [], + "vpc_security_group_ids": [ + "aws_security_group.web-node", + ], + }, + }, + }, + "aws_internet_gateway": { + "web_igw": { + "config": {}, + "provisioners": null, + "references": { + "tags": [ + "local.resource_prefix", + ], + "vpc_id": [ + "aws_vpc.web_vpc", + ], + }, + }, + }, + "aws_kms_alias": { + "logs_key_alias": { + "config": {}, + "provisioners": null, + "references": { + "name": [ + "local.resource_prefix", + ], + "target_key_id": [ + "aws_kms_key.logs_key", + ], + }, + }, + }, + "aws_kms_key": { + "logs_key": { + "config": { + "deletion_window_in_days": 7, + }, + "provisioners": null, + "references": { + "deletion_window_in_days": [], + "description": [ + "local.resource_prefix", + ], + }, + }, + }, + "aws_lambda_function": { + "analysis_lambda": { + "config": { + "environment": [ + { + "variables": { + "access_key": "{{REDACTED}}", + "secret_key": "{{REDACTED}}", + }, + }, + ], + "filename": "resources/lambda_function_payload.zip", + "handler": "exports.test", + "runtime": "nodejs12.x", + "source_code_hash": null, + }, + "provisioners": null, + "references": { + "environment": [ + { + "variables": [], + }, + ], + "filename": [], + "function_name": [ + "local.resource_prefix", + ], + "handler": [], + "role": [ + "aws_iam_role.iam_for_lambda", + ], + "runtime": [], + "source_code_hash": [], + }, + }, + }, + "aws_neptune_cluster": { + "default": { + "config": { + "apply_immediately": true, + "backup_retention_period": 5, + "engine": "neptune", + "iam_database_authentication_enabled": false, + "preferred_backup_window": "07:00-09:00", + "skip_final_snapshot": true, + "storage_encrypted": false, + }, + "provisioners": null, + "references": { + "apply_immediately": [], + "backup_retention_period": [], + "cluster_identifier": [ + "var.neptune-dbname", + ], + "engine": [], + "iam_database_authentication_enabled": [], + "preferred_backup_window": [], + "skip_final_snapshot": [], + "storage_encrypted": [], + }, + }, + }, + "aws_neptune_cluster_instance": { + "default": { + "config": { + "apply_immediately": true, + "engine": "neptune", + "instance_class": "db.t3.medium", + }, + "provisioners": null, + "references": { + "apply_immediately": [], + "cluster_identifier": [ + "aws_neptune_cluster.default", + ], + "engine": [], + "instance_class": [], + }, + }, + }, + "aws_neptune_cluster_snapshot": { + "default": { + "config": { + "db_cluster_snapshot_identifier": "resourcetestsnapshot1", + }, + "provisioners": null, + "references": { + "db_cluster_identifier": [ + "aws_neptune_cluster.default", + ], + "db_cluster_snapshot_identifier": [], + }, + }, + }, + "aws_network_interface": { + "web-eni": { + "config": { + "private_ips": [ + "172.16.10.100", + ], + }, + "provisioners": null, + "references": { + "private_ips": [], + "subnet_id": [ + "aws_subnet.web_subnet", + ], + "tags": [ + "local.resource_prefix", + ], + }, + }, + }, + "aws_route": { + "public_internet_gateway": { + "config": { + "destination_cidr_block": "0.0.0.0/0", + "timeouts": null, + }, + "provisioners": null, + "references": { + "destination_cidr_block": [], + "gateway_id": [ + "aws_internet_gateway.web_igw", + ], + "route_table_id": [ + "aws_route_table.web_rtb", + ], + "timeouts": [], + }, + }, + }, + "aws_route_table": { + "web_rtb": { + "config": {}, + "provisioners": null, + "references": { + "tags": [ + "local.resource_prefix", + ], + "vpc_id": [ + "aws_vpc.web_vpc", + ], + }, + }, + }, + "aws_route_table_association": { + "rtbassoc": { + "config": {}, + "provisioners": null, + "references": { + "route_table_id": [ + "aws_route_table.web_rtb", + ], + "subnet_id": [ + "aws_subnet.web_subnet", + ], + }, + }, + "rtbassoc2": { + "config": {}, + "provisioners": null, + "references": { + "route_table_id": [ + "aws_route_table.web_rtb", + ], + "subnet_id": [ + "aws_subnet.web_subnet2", + ], + }, + }, + }, + "aws_s3_bucket": { + "data": { + "config": { + "acl": "public-read", + "force_destroy": true, + }, + "provisioners": null, + "references": { + "acl": [], + "bucket": [ + "local.resource_prefix", + ], + "force_destroy": [], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "data_science": { + "config": { + "acl": "private", + "force_destroy": true, + "logging": [ + { + "target_prefix": "log/", + }, + ], + "versioning": [ + { + "enabled": true, + }, + ], + }, + "provisioners": null, + "references": { + "acl": [], + "bucket": [ + "local.resource_prefix", + ], + "force_destroy": [], + "logging": [ + { + "target_bucket": [ + "aws_s3_bucket.logs", + ], + "target_prefix": [], + }, + ], + "versioning": [ + { + "enabled": [], + }, + ], + }, + }, + "financials": { + "config": { + "acl": "private", + "force_destroy": true, + }, + "provisioners": null, + "references": { + "acl": [], + "bucket": [ + "local.resource_prefix", + ], + "force_destroy": [], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "flowbucket": { + "config": { + "force_destroy": true, + }, + "provisioners": null, + "references": { + "bucket": [ + "local.resource_prefix", + ], + "force_destroy": [], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "logs": { + "config": { + "acl": "log-delivery-write", + "force_destroy": true, + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "sse_algorithm": "aws:kms", + }, + ], + }, + ], + }, + ], + "versioning": [ + { + "enabled": true, + }, + ], + }, + "provisioners": null, + "references": { + "acl": [], + "bucket": [ + "local.resource_prefix", + ], + "force_destroy": [], + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "kms_master_key_id": [ + "aws_kms_key.logs_key", + ], + "sse_algorithm": [], + }, + ], + }, + ], + }, + ], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + "versioning": [ + { + "enabled": [], + }, + ], + }, + }, + "operations": { + "config": { + "acl": "private", + "force_destroy": true, + "versioning": [ + { + "enabled": true, + }, + ], + }, + "provisioners": null, + "references": { + "acl": [], + "bucket": [ + "local.resource_prefix", + ], + "force_destroy": [], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + "versioning": [ + { + "enabled": [], + }, + ], + }, + }, + }, + "aws_s3_bucket_object": { + "data_object": { + "config": { + "key": "customer-master.xlsx", + "source": "resources/customer-master.xlsx", + }, + "provisioners": null, + "references": { + "bucket": [ + "aws_s3_bucket.data", + ], + "key": [], + "source": [], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + }, + "aws_security_group": { + "default": { + "config": {}, + "provisioners": null, + "references": { + "name": [ + "local.resource_prefix", + ], + "tags": [ + "local.resource_prefix", + "local.resource_prefix", + ], + "vpc_id": [ + "aws_vpc.web_vpc", + ], + }, + }, + "web-node": { + "config": {}, + "provisioners": null, + "references": { + "description": [ + "local.resource_prefix", + ], + "name": [ + "local.resource_prefix", + ], + "vpc_id": [ + "aws_vpc.web_vpc", + ], + }, + }, + }, + "aws_security_group_rule": { + "egress": { + "config": { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "from_port": 0, + "protocol": "-1", + "to_port": 0, + "type": "egress", + }, + "provisioners": null, + "references": { + "cidr_blocks": [], + "from_port": [], + "protocol": [], + "security_group_id": [ + "aws_security_group.default", + ], + "to_port": [], + "type": [], + }, + }, + "ingress": { + "config": { + "from_port": "3306", + "protocol": "tcp", + "to_port": "3306", + "type": "ingress", + }, + "provisioners": null, + "references": { + "cidr_blocks": [ + "aws_vpc.web_vpc", + ], + "from_port": [], + "protocol": [], + "security_group_id": [ + "aws_security_group.default", + ], + "to_port": [], + "type": [], + }, + }, + }, + "aws_subnet": { + "eks_subnet1": { + "config": { + "cidr_block": "10.10.10.0/24", + "map_public_ip_on_launch": true, + }, + "provisioners": null, + "references": { + "availability_zone": [ + "var.availability_zone", + ], + "cidr_block": [], + "map_public_ip_on_launch": [], + "tags": [ + "local.resource_prefix", + "local.eks_name", + ], + "vpc_id": [ + "aws_vpc.eks_vpc", + ], + }, + }, + "eks_subnet2": { + "config": { + "cidr_block": "10.10.11.0/24", + "map_public_ip_on_launch": true, + }, + "provisioners": null, + "references": { + "availability_zone": [ + "var.availability_zone2", + ], + "cidr_block": [], + "map_public_ip_on_launch": [], + "tags": [ + "local.resource_prefix", + "local.eks_name", + ], + "vpc_id": [ + "aws_vpc.eks_vpc", + ], + }, + }, + "web_subnet": { + "config": { + "cidr_block": "172.16.10.0/24", + "map_public_ip_on_launch": true, + }, + "provisioners": null, + "references": { + "availability_zone": [ + "var.availability_zone", + ], + "cidr_block": [], + "map_public_ip_on_launch": [], + "tags": [ + "local.resource_prefix", + ], + "vpc_id": [ + "aws_vpc.web_vpc", + ], + }, + }, + "web_subnet2": { + "config": { + "cidr_block": "172.16.11.0/24", + "map_public_ip_on_launch": true, + }, + "provisioners": null, + "references": { + "availability_zone": [ + "var.availability_zone2", + ], + "cidr_block": [], + "map_public_ip_on_launch": [], + "tags": [ + "local.resource_prefix", + ], + "vpc_id": [ + "aws_vpc.web_vpc", + ], + }, + }, + }, + "aws_volume_attachment": { + "ebs_att": { + "config": { + "device_name": "/dev/sdh", + }, + "provisioners": null, + "references": { + "device_name": [], + "instance_id": [ + "aws_instance.web_host", + ], + "volume_id": [ + "aws_ebs_volume.web_host_storage", + ], + }, + }, + }, + "aws_vpc": { + "eks_vpc": { + "config": { + "cidr_block": "10.10.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + }, + "provisioners": null, + "references": { + "cidr_block": [], + "enable_dns_hostnames": [], + "enable_dns_support": [], + "tags": [ + "local.resource_prefix", + ], + }, + }, + "web_vpc": { + "config": { + "cidr_block": "172.16.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + }, + "provisioners": null, + "references": { + "cidr_block": [], + "enable_dns_hostnames": [], + "enable_dns_support": [], + "tags": [ + "local.resource_prefix", + ], + }, + }, + }, + "null_resource": { + "push_image": { + "config": {}, + "provisioners": [ + { + "config": {}, + "references": { + "command": [ + "var.region", + "data.aws_caller_identity.current", + "var.region", + "aws_ecr_repository.repository", + "aws_ecr_repository.repository", + "local.docker_image", + "local.docker_image", + ], + "working_dir": [ + "path.module", + ], + }, + "type": "local-exec", + }, + ], + "references": {}, + }, + }, + }, + "variables": { + "ami": { + "default": "ami-09a5b0b7edf08843d", + "description": "", + }, + "availability_zone": { + "default": "us-west-2a", + "description": "", + }, + "availability_zone2": { + "default": "us-west-2b", + "description": "", + }, + "company_name": { + "default": "acme", + "description": "", + }, + "dbname": { + "default": "db1", + "description": "Name of the Database", + }, + "environment": { + "default": "dev", + "description": "", + }, + "neptune-dbname": { + "default": "neptunedb1", + "description": "Name of the Neptune graph database", + }, + "password": { + "default": "Aa1234321Bb", + "description": "Database password", + }, + "profile": { + "default": "default", + "description": "", + }, + "region": { + "default": "us-west-2", + "description": "", + }, + }, + }, +} + +module_paths = [ + [], +] + +module = func(path) { + if types.type_of(path) is not "list" { + error("expected list, got", types.type_of(path)) + } + + if length(path) < 1 { + return _modules.root + } + + addr = [] + for path as p { + append(addr, "module") + append(addr, p) + } + + return _modules[strings.join(addr, ".")] +} + +data = _modules.root.data +modules = _modules.root.modules +providers = _modules.root.providers +resources = _modules.root.resources +variables = _modules.root.variables +outputs = _modules.root.outputs diff --git a/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfplan-v2.sentinel b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfplan-v2.sentinel new file mode 100644 index 0000000..05308e8 --- /dev/null +++ b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfplan-v2.sentinel @@ -0,0 +1,9837 @@ +terraform_version = "0.14.7" + +planned_values = { + "outputs": { + "db_app_public_dns": { + "name": "db_app_public_dns", + "sensitive": false, + "value": undefined, + }, + "db_endpoint": { + "name": "db_endpoint", + "sensitive": false, + "value": undefined, + }, + "ec2_public_dns": { + "name": "ec2_public_dns", + "sensitive": false, + "value": undefined, + }, + "endpoint": { + "name": "endpoint", + "sensitive": false, + "value": undefined, + }, + "kubeconfig-certificate-authority-data": { + "name": "kubeconfig-certificate-authority-data", + "sensitive": false, + "value": undefined, + }, + "public_subnet": { + "name": "public_subnet", + "sensitive": false, + "value": undefined, + }, + "public_subnet2": { + "name": "public_subnet2", + "sensitive": false, + "value": undefined, + }, + "secret": { + "name": "secret", + "sensitive": false, + "value": undefined, + }, + "username": { + "name": "username", + "sensitive": false, + "value": "123456789123-acme-dev-user", + }, + "vpc_id": { + "name": "vpc_id", + "sensitive": false, + "value": undefined, + }, + }, + "resources": { + "aws_db_instance.default": { + "address": "aws_db_instance.default", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_db_instance", + "values": { + "allocated_storage": 20, + "allow_major_version_upgrade": null, + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "backup_retention_period": 0, + "copy_tags_to_snapshot": false, + "db_subnet_group_name": "sg-123456789123-acme-dev", + "delete_automated_backups": true, + "deletion_protection": null, + "domain": null, + "domain_iam_role_name": null, + "enabled_cloudwatch_logs_exports": null, + "engine": "mysql", + "engine_version": "8.0", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": null, + "identifier": "rds-123456789123-acme-dev", + "instance_class": "db.t3.micro", + "iops": null, + "max_allocated_storage": null, + "monitoring_interval": 0, + "multi_az": false, + "name": "db1", + "option_group_name": "og-123456789123-acme-dev", + "parameter_group_name": "pg-123456789123-acme-dev", + "password": "Aa1234321Bb", + "performance_insights_enabled": false, + "publicly_accessible": true, + "replicate_source_db": null, + "restore_to_point_in_time": [], + "s3_import": [], + "security_group_names": null, + "skip_final_snapshot": true, + "storage_encrypted": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds", + }, + "timeouts": null, + "username": "admin", + }, + }, + "aws_db_option_group.default": { + "address": "aws_db_option_group.default", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_db_option_group", + "values": { + "engine_name": "mysql", + "major_engine_version": "8.0", + "name": "og-123456789123-acme-dev", + "option": [], + "option_group_description": "Terraform OG", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-og", + }, + "timeouts": null, + }, + }, + "aws_db_parameter_group.default": { + "address": "aws_db_parameter_group.default", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_db_parameter_group", + "values": { + "description": "Terraform PG", + "family": "mysql8.0", + "name": "pg-123456789123-acme-dev", + "parameter": [ + { + "apply_method": "immediate", + "name": "character_set_client", + "value": "utf8", + }, + { + "apply_method": "immediate", + "name": "character_set_server", + "value": "utf8", + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-pg", + }, + }, + }, + "aws_db_subnet_group.default": { + "address": "aws_db_subnet_group.default", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_db_subnet_group", + "values": { + "description": "Terraform DB Subnet Group", + "name": "sg-123456789123-acme-dev", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "sg-123456789123-acme-dev", + }, + }, + }, + "aws_ebs_snapshot.example_snapshot": { + "address": "aws_ebs_snapshot.example_snapshot", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "example_snapshot", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_ebs_snapshot", + "values": { + "description": "123456789123-acme-dev-ebs-snapshot", + "tags": { + "Name": "123456789123-acme-dev-ebs-snapshot", + }, + "timeouts": null, + }, + }, + "aws_ebs_volume.web_host_storage": { + "address": "aws_ebs_volume.web_host_storage", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_host_storage", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_ebs_volume", + "values": { + "availability_zone": "us-west-2a", + "multi_attach_enabled": null, + "outpost_arn": null, + "size": 1, + "tags": { + "Name": "123456789123-acme-dev-ebs", + }, + }, + }, + "aws_ecr_repository.repository": { + "address": "aws_ecr_repository.repository", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "repository", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_ecr_repository", + "values": { + "encryption_configuration": [], + "image_scanning_configuration": [], + "image_tag_mutability": "MUTABLE", + "name": "123456789123-acme-dev-repository", + "tags": { + "Name": "123456789123-acme-dev-repository", + }, + "timeouts": null, + }, + }, + "aws_eks_cluster.eks_cluster": { + "address": "aws_eks_cluster.eks_cluster", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "eks_cluster", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_eks_cluster", + "values": { + "enabled_cluster_log_types": null, + "encryption_config": [], + "name": "123456789123-acme-dev-eks", + "tags": null, + "timeouts": null, + "vpc_config": [ + { + "endpoint_private_access": true, + "endpoint_public_access": true, + "security_group_ids": null, + }, + ], + }, + }, + "aws_elasticsearch_domain.monitoring-framework": { + "address": "aws_elasticsearch_domain.monitoring-framework", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "monitoring-framework", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_elasticsearch_domain", + "values": { + "cluster_config": [ + { + "dedicated_master_count": null, + "dedicated_master_enabled": false, + "dedicated_master_type": null, + "instance_count": 1, + "instance_type": "t2.small.elasticsearch", + "warm_count": null, + "warm_enabled": null, + "warm_type": null, + "zone_awareness_config": [], + "zone_awareness_enabled": null, + }, + ], + "cognito_options": [], + "domain_name": "tg-dev-es", + "ebs_options": [ + { + "ebs_enabled": true, + "iops": null, + "volume_size": 30, + }, + ], + "elasticsearch_version": "2.3", + "log_publishing_options": [], + "snapshot_options": [], + "tags": null, + "timeouts": null, + "vpc_options": [], + }, + }, + "aws_elasticsearch_domain_policy.monitoring-framework-policy": { + "address": "aws_elasticsearch_domain_policy.monitoring-framework-policy", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "monitoring-framework-policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_elasticsearch_domain_policy", + "values": { + "access_policies": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "domain_name": "tg-dev-es", + }, + }, + "aws_elb.weblb": { + "address": "aws_elb.weblb", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "weblb", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_elb", + "values": { + "access_logs": [], + "connection_draining": true, + "connection_draining_timeout": 400, + "cross_zone_load_balancing": true, + "health_check": [ + { + "healthy_threshold": 2, + "interval": 30, + "target": "HTTP:8000/", + "timeout": 3, + "unhealthy_threshold": 2, + }, + ], + "idle_timeout": 400, + "listener": [ + { + "instance_port": 8000, + "instance_protocol": "http", + "lb_port": 80, + "lb_protocol": "http", + "ssl_certificate_id": "", + }, + ], + "name": "weblb-terraform-elb", + "name_prefix": null, + "tags": { + "Name": "foobar-terraform-elb", + }, + }, + }, + "aws_flow_log.vpcflowlogs": { + "address": "aws_flow_log.vpcflowlogs", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "vpcflowlogs", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_flow_log", + "values": { + "eni_id": null, + "iam_role_arn": null, + "log_destination_type": "s3", + "max_aggregation_interval": 600, + "subnet_id": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "traffic_type": "ALL", + }, + }, + "aws_iam_access_key.user": { + "address": "aws_iam_access_key.user", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "user", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_access_key", + "values": { + "pgp_key": null, + "user": "123456789123-acme-dev-user", + }, + }, + "aws_iam_instance_profile.ec2profile": { + "address": "aws_iam_instance_profile.ec2profile", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ec2profile", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_instance_profile", + "values": { + "name": "123456789123-acme-dev-profile", + "name_prefix": null, + "path": "/", + "role": "123456789123-acme-dev-role", + "tags": null, + }, + }, + "aws_iam_role.ec2role": { + "address": "aws_iam_role.ec2role", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ec2role", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_role", + "values": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-role", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-role", + }, + }, + }, + "aws_iam_role.iam_for_eks": { + "address": "aws_iam_role.iam_for_eks", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "iam_for_eks", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_role", + "values": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-iam-for-eks", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + }, + "aws_iam_role.iam_for_lambda": { + "address": "aws_iam_role.iam_for_lambda", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "iam_for_lambda", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_role", + "values": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-analysis-lambda", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + }, + "aws_iam_role_policy.ec2policy": { + "address": "aws_iam_role_policy.ec2policy", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ec2policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_role_policy", + "values": { + "name": "123456789123-acme-dev-policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + }, + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy": { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "policy_attachment-AmazonEKSClusterPolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_role_policy_attachment", + "values": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + }, + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy": { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "policy_attachment-AmazonEKSServicePolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_role_policy_attachment", + "values": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + }, + "aws_iam_user.user": { + "address": "aws_iam_user.user", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "user", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_user", + "values": { + "force_destroy": true, + "name": "123456789123-acme-dev-user", + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-user", + }, + }, + }, + "aws_iam_user_policy.userpolicy": { + "address": "aws_iam_user_policy.userpolicy", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "userpolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_user_policy", + "values": { + "name": "excess_policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + "user": "123456789123-acme-dev-user", + }, + }, + "aws_instance.db_app": { + "address": "aws_instance.db_app", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "db_app", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_instance", + "values": { + "ami": "ami-06d584c1805ad64fb", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": "123456789123-acme-dev-profile", + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-dbapp", + }, + "timeouts": null, + "user_data_base64": null, + "volume_tags": null, + }, + }, + "aws_instance.web_host": { + "address": "aws_instance.web_host", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_host", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_instance", + "values": { + "ami": "ami-09a5b0b7edf08843d", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": null, + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-ec2", + }, + "timeouts": null, + "user_data": "44c6c808e6449ee36dfcfc4ebd66c1b9634b40f2", + "user_data_base64": null, + "volume_tags": null, + }, + }, + "aws_internet_gateway.web_igw": { + "address": "aws_internet_gateway.web_igw", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_igw", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_internet_gateway", + "values": { + "tags": { + "Name": "123456789123-acme-dev-igw", + }, + }, + }, + "aws_kms_alias.logs_key_alias": { + "address": "aws_kms_alias.logs_key_alias", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "logs_key_alias", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_kms_alias", + "values": { + "name": "alias/123456789123-acme-dev-logs-bucket-key", + "name_prefix": null, + }, + }, + "aws_kms_key.logs_key": { + "address": "aws_kms_key.logs_key", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "logs_key", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_kms_key", + "values": { + "customer_master_key_spec": "SYMMETRIC_DEFAULT", + "deletion_window_in_days": 7, + "description": "123456789123-acme-dev-logs bucket key", + "enable_key_rotation": false, + "is_enabled": true, + "key_usage": "ENCRYPT_DECRYPT", + "tags": null, + }, + }, + "aws_lambda_function.analysis_lambda": { + "address": "aws_lambda_function.analysis_lambda", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "analysis_lambda", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_lambda_function", + "values": { + "code_signing_config_arn": null, + "dead_letter_config": [], + "description": null, + "environment": [ + { + "variables": { + "access_key": "{{REDACTED}}", + "secret_key": "{{REDACTED}}", + }, + }, + ], + "file_system_config": [], + "filename": "resources/lambda_function_payload.zip", + "function_name": "123456789123-acme-dev-analysis", + "handler": "exports.test", + "image_config": [], + "image_uri": null, + "kms_key_arn": null, + "layers": null, + "memory_size": 128, + "package_type": "Zip", + "publish": false, + "reserved_concurrent_executions": -1, + "runtime": "nodejs12.x", + "s3_bucket": null, + "s3_key": null, + "s3_object_version": null, + "source_code_hash": "Fne61Y/F2pmVywaVqIYcztFMK3LNeMJKpWFNnxDdGTw=", + "tags": null, + "timeout": 3, + "timeouts": null, + "vpc_config": [], + }, + }, + "aws_neptune_cluster.default": { + "address": "aws_neptune_cluster.default", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_neptune_cluster", + "values": { + "apply_immediately": true, + "backup_retention_period": 5, + "cluster_identifier": "neptunedb1", + "deletion_protection": null, + "enable_cloudwatch_logs_exports": null, + "engine": "neptune", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": false, + "iam_roles": null, + "neptune_cluster_parameter_group_name": "default.neptune1", + "port": 8182, + "preferred_backup_window": "07:00-09:00", + "replication_source_identifier": null, + "skip_final_snapshot": true, + "snapshot_identifier": null, + "storage_encrypted": false, + "tags": null, + "timeouts": null, + }, + }, + "aws_neptune_cluster_instance.default[0]": { + "address": "aws_neptune_cluster_instance.default[0]", + "depends_on": [], + "deposed_key": "", + "index": 0, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_neptune_cluster_instance", + "values": { + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "engine": "neptune", + "instance_class": "db.t3.medium", + "neptune_parameter_group_name": "default.neptune1", + "port": 8182, + "promotion_tier": 0, + "publicly_accessible": false, + "tags": null, + "timeouts": null, + }, + }, + "aws_neptune_cluster_snapshot.default": { + "address": "aws_neptune_cluster_snapshot.default", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_neptune_cluster_snapshot", + "values": { + "db_cluster_snapshot_identifier": "resourcetestsnapshot1", + "timeouts": null, + }, + }, + "aws_network_interface.web-eni": { + "address": "aws_network_interface.web-eni", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web-eni", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_network_interface", + "values": { + "description": null, + "private_ips": [ + "172.16.10.100", + ], + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-primary_network_interface", + }, + }, + }, + "aws_route.public_internet_gateway": { + "address": "aws_route.public_internet_gateway", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "public_internet_gateway", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_route", + "values": { + "carrier_gateway_id": null, + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": null, + "destination_prefix_list_id": null, + "egress_only_gateway_id": null, + "local_gateway_id": null, + "nat_gateway_id": null, + "timeouts": { + "create": "5m", + "delete": null, + }, + "transit_gateway_id": null, + "vpc_endpoint_id": null, + "vpc_peering_connection_id": null, + }, + }, + "aws_route_table.web_rtb": { + "address": "aws_route_table.web_rtb", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_rtb", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_route_table", + "values": { + "tags": { + "Name": "123456789123-acme-dev-rtb", + }, + }, + }, + "aws_route_table_association.rtbassoc": { + "address": "aws_route_table_association.rtbassoc", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "rtbassoc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_route_table_association", + "values": { + "gateway_id": null, + }, + }, + "aws_route_table_association.rtbassoc2": { + "address": "aws_route_table_association.rtbassoc2", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "rtbassoc2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_route_table_association", + "values": { + "gateway_id": null, + }, + }, + "aws_s3_bucket.data": { + "address": "aws_s3_bucket.data", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "data", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_s3_bucket", + "values": { + "acl": "public-read", + "bucket": "123456789123-acme-dev-data", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-data", + }, + "website": [], + }, + }, + "aws_s3_bucket.data_science": { + "address": "aws_s3_bucket.data_science", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "data_science", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_s3_bucket", + "values": { + "acl": "private", + "bucket": "123456789123-acme-dev-data-science", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [ + { + "target_prefix": "log/", + }, + ], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": null, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + }, + "aws_s3_bucket.financials": { + "address": "aws_s3_bucket.financials", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "financials", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_s3_bucket", + "values": { + "acl": "private", + "bucket": "123456789123-acme-dev-financials", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-financials", + }, + "website": [], + }, + }, + "aws_s3_bucket.flowbucket": { + "address": "aws_s3_bucket.flowbucket", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "flowbucket", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_s3_bucket", + "values": { + "acl": "private", + "bucket": "123456789123-acme-dev-flowlogs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "website": [], + }, + }, + "aws_s3_bucket.logs": { + "address": "aws_s3_bucket.logs", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "logs", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_s3_bucket", + "values": { + "acl": "log-delivery-write", + "bucket": "123456789123-acme-dev-logs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "sse_algorithm": "aws:kms", + }, + ], + "bucket_key_enabled": null, + }, + ], + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-logs", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + }, + "aws_s3_bucket.operations": { + "address": "aws_s3_bucket.operations", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "operations", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_s3_bucket", + "values": { + "acl": "private", + "bucket": "123456789123-acme-dev-operations", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-operations", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + }, + "aws_s3_bucket_object.data_object": { + "address": "aws_s3_bucket_object.data_object", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "data_object", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_s3_bucket_object", + "values": { + "acl": "private", + "cache_control": null, + "content": null, + "content_base64": null, + "content_disposition": null, + "content_encoding": null, + "content_language": null, + "force_destroy": false, + "key": "customer-master.xlsx", + "metadata": null, + "object_lock_legal_hold_status": null, + "object_lock_mode": null, + "object_lock_retain_until_date": null, + "source": "resources/customer-master.xlsx", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-customer-master", + }, + "website_redirect": null, + }, + }, + "aws_security_group.default": { + "address": "aws_security_group.default", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_security_group", + "values": { + "description": "Managed by Terraform", + "name": "123456789123-acme-dev-rds-sg", + "revoke_rules_on_delete": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds-sg", + }, + "timeouts": null, + }, + }, + "aws_security_group.web-node": { + "address": "aws_security_group.web-node", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web-node", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_security_group", + "values": { + "description": "123456789123-acme-dev Security Group", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0, + }, + ], + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 22, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 22, + }, + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 80, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 80, + }, + ], + "name": "123456789123-acme-dev-sg", + "revoke_rules_on_delete": false, + "tags": null, + "timeouts": null, + }, + }, + "aws_security_group_rule.egress": { + "address": "aws_security_group_rule.egress", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "egress", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_security_group_rule", + "values": { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": null, + "from_port": 0, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "-1", + "self": false, + "to_port": 0, + "type": "egress", + }, + }, + "aws_security_group_rule.ingress": { + "address": "aws_security_group_rule.ingress", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ingress", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_security_group_rule", + "values": { + "cidr_blocks": [ + "172.16.0.0/16", + ], + "description": null, + "from_port": 3306, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "tcp", + "self": false, + "to_port": 3306, + "type": "ingress", + }, + }, + "aws_subnet.eks_subnet1": { + "address": "aws_subnet.eks_subnet1", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "eks_subnet1", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_subnet", + "values": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "10.10.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + }, + "aws_subnet.eks_subnet2": { + "address": "aws_subnet.eks_subnet2", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "eks_subnet2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_subnet", + "values": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "10.10.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + }, + "aws_subnet.web_subnet": { + "address": "aws_subnet.web_subnet", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_subnet", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_subnet", + "values": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "172.16.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet", + }, + "timeouts": null, + }, + }, + "aws_subnet.web_subnet2": { + "address": "aws_subnet.web_subnet2", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_subnet2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_subnet", + "values": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "172.16.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet2", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet2", + }, + "timeouts": null, + }, + }, + "aws_volume_attachment.ebs_att": { + "address": "aws_volume_attachment.ebs_att", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ebs_att", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_volume_attachment", + "values": { + "device_name": "/dev/sdh", + "force_detach": null, + "skip_destroy": null, + }, + }, + "aws_vpc.eks_vpc": { + "address": "aws_vpc.eks_vpc", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "eks_vpc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_vpc", + "values": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.10.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + }, + }, + "aws_vpc.web_vpc": { + "address": "aws_vpc.web_vpc", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_vpc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_vpc", + "values": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "172.16.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-vpc", + }, + }, + }, + "null_resource.push_image": { + "address": "null_resource.push_image", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "push_image", + "provider_name": "registry.terraform.io/hashicorp/null", + "tainted": false, + "type": "null_resource", + "values": { + "triggers": null, + }, + }, + }, +} + +variables = { + "ami": { + "name": "ami", + "value": "ami-09a5b0b7edf08843d", + }, + "availability_zone": { + "name": "availability_zone", + "value": "us-west-2a", + }, + "availability_zone2": { + "name": "availability_zone2", + "value": "us-west-2b", + }, + "company_name": { + "name": "company_name", + "value": "acme", + }, + "dbname": { + "name": "dbname", + "value": "db1", + }, + "environment": { + "name": "environment", + "value": "dev", + }, + "neptune-dbname": { + "name": "neptune-dbname", + "value": "neptunedb1", + }, + "password": { + "name": "password", + "value": "Aa1234321Bb", + }, + "profile": { + "name": "profile", + "value": "default", + }, + "region": { + "name": "region", + "value": "us-west-2", + }, +} + +resource_changes = { + "aws_db_instance.default": { + "address": "aws_db_instance.default", + "change": { + "actions": [ + "create", + ], + "after": { + "allocated_storage": 20, + "allow_major_version_upgrade": null, + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "backup_retention_period": 0, + "copy_tags_to_snapshot": false, + "db_subnet_group_name": "sg-123456789123-acme-dev", + "delete_automated_backups": true, + "deletion_protection": null, + "domain": null, + "domain_iam_role_name": null, + "enabled_cloudwatch_logs_exports": null, + "engine": "mysql", + "engine_version": "8.0", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": null, + "identifier": "rds-123456789123-acme-dev", + "instance_class": "db.t3.micro", + "iops": null, + "max_allocated_storage": null, + "monitoring_interval": 0, + "multi_az": false, + "name": "db1", + "option_group_name": "og-123456789123-acme-dev", + "parameter_group_name": "pg-123456789123-acme-dev", + "password": "Aa1234321Bb", + "performance_insights_enabled": false, + "publicly_accessible": true, + "replicate_source_db": null, + "restore_to_point_in_time": [], + "s3_import": [], + "security_group_names": null, + "skip_final_snapshot": true, + "storage_encrypted": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds", + }, + "timeouts": null, + "username": "admin", + }, + "after_unknown": { + "address": true, + "arn": true, + "availability_zone": true, + "backup_window": true, + "ca_cert_identifier": true, + "character_set_name": true, + "endpoint": true, + "hosted_zone_id": true, + "id": true, + "identifier_prefix": true, + "kms_key_id": true, + "latest_restorable_time": true, + "license_model": true, + "maintenance_window": true, + "monitoring_role_arn": true, + "performance_insights_kms_key_id": true, + "performance_insights_retention_period": true, + "port": true, + "replicas": true, + "resource_id": true, + "restore_to_point_in_time": [], + "s3_import": [], + "snapshot_identifier": true, + "status": true, + "storage_type": true, + "tags": {}, + "timezone": true, + "vpc_security_group_ids": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_db_instance", + }, + "aws_db_option_group.default": { + "address": "aws_db_option_group.default", + "change": { + "actions": [ + "create", + ], + "after": { + "engine_name": "mysql", + "major_engine_version": "8.0", + "name": "og-123456789123-acme-dev", + "option": [], + "option_group_description": "Terraform OG", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-og", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "id": true, + "name_prefix": true, + "option": [], + "tags": {}, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_db_option_group", + }, + "aws_db_parameter_group.default": { + "address": "aws_db_parameter_group.default", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "Terraform PG", + "family": "mysql8.0", + "name": "pg-123456789123-acme-dev", + "parameter": [ + { + "apply_method": "immediate", + "name": "character_set_client", + "value": "utf8", + }, + { + "apply_method": "immediate", + "name": "character_set_server", + "value": "utf8", + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-pg", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "name_prefix": true, + "parameter": [ + {}, + {}, + ], + "tags": {}, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_db_parameter_group", + }, + "aws_db_subnet_group.default": { + "address": "aws_db_subnet_group.default", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "Terraform DB Subnet Group", + "name": "sg-123456789123-acme-dev", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "sg-123456789123-acme-dev", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "name_prefix": true, + "subnet_ids": true, + "tags": {}, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_db_subnet_group", + }, + "aws_ebs_snapshot.example_snapshot": { + "address": "aws_ebs_snapshot.example_snapshot", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "123456789123-acme-dev-ebs-snapshot", + "tags": { + "Name": "123456789123-acme-dev-ebs-snapshot", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "data_encryption_key_id": true, + "encrypted": true, + "id": true, + "kms_key_id": true, + "owner_alias": true, + "owner_id": true, + "tags": {}, + "volume_id": true, + "volume_size": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "example_snapshot", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_ebs_snapshot", + }, + "aws_ebs_volume.web_host_storage": { + "address": "aws_ebs_volume.web_host_storage", + "change": { + "actions": [ + "create", + ], + "after": { + "availability_zone": "us-west-2a", + "multi_attach_enabled": null, + "outpost_arn": null, + "size": 1, + "tags": { + "Name": "123456789123-acme-dev-ebs", + }, + }, + "after_unknown": { + "arn": true, + "encrypted": true, + "id": true, + "iops": true, + "kms_key_id": true, + "snapshot_id": true, + "tags": {}, + "throughput": true, + "type": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_host_storage", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_ebs_volume", + }, + "aws_ecr_repository.repository": { + "address": "aws_ecr_repository.repository", + "change": { + "actions": [ + "create", + ], + "after": { + "encryption_configuration": [], + "image_scanning_configuration": [], + "image_tag_mutability": "MUTABLE", + "name": "123456789123-acme-dev-repository", + "tags": { + "Name": "123456789123-acme-dev-repository", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "encryption_configuration": [], + "id": true, + "image_scanning_configuration": [], + "registry_id": true, + "repository_url": true, + "tags": {}, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "repository", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_ecr_repository", + }, + "aws_eks_cluster.eks_cluster": { + "address": "aws_eks_cluster.eks_cluster", + "change": { + "actions": [ + "create", + ], + "after": { + "enabled_cluster_log_types": null, + "encryption_config": [], + "name": "123456789123-acme-dev-eks", + "tags": null, + "timeouts": null, + "vpc_config": [ + { + "endpoint_private_access": true, + "endpoint_public_access": true, + "security_group_ids": null, + }, + ], + }, + "after_unknown": { + "arn": true, + "certificate_authority": true, + "created_at": true, + "encryption_config": [], + "endpoint": true, + "id": true, + "identity": true, + "kubernetes_network_config": true, + "platform_version": true, + "role_arn": true, + "status": true, + "version": true, + "vpc_config": [ + { + "cluster_security_group_id": true, + "public_access_cidrs": true, + "subnet_ids": true, + "vpc_id": true, + }, + ], + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "eks_cluster", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_eks_cluster", + }, + "aws_elasticsearch_domain.monitoring-framework": { + "address": "aws_elasticsearch_domain.monitoring-framework", + "change": { + "actions": [ + "create", + ], + "after": { + "cluster_config": [ + { + "dedicated_master_count": null, + "dedicated_master_enabled": false, + "dedicated_master_type": null, + "instance_count": 1, + "instance_type": "t2.small.elasticsearch", + "warm_count": null, + "warm_enabled": null, + "warm_type": null, + "zone_awareness_config": [], + "zone_awareness_enabled": null, + }, + ], + "cognito_options": [], + "domain_name": "tg-dev-es", + "ebs_options": [ + { + "ebs_enabled": true, + "iops": null, + "volume_size": 30, + }, + ], + "elasticsearch_version": "2.3", + "log_publishing_options": [], + "snapshot_options": [], + "tags": null, + "timeouts": null, + "vpc_options": [], + }, + "after_unknown": { + "access_policies": true, + "advanced_options": true, + "advanced_security_options": true, + "arn": true, + "cluster_config": [ + { + "zone_awareness_config": [], + }, + ], + "cognito_options": [], + "domain_endpoint_options": true, + "domain_id": true, + "ebs_options": [ + { + "volume_type": true, + }, + ], + "encrypt_at_rest": true, + "endpoint": true, + "id": true, + "kibana_endpoint": true, + "log_publishing_options": [], + "node_to_node_encryption": true, + "snapshot_options": [], + "vpc_options": [], + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "monitoring-framework", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_elasticsearch_domain", + }, + "aws_elasticsearch_domain_policy.monitoring-framework-policy": { + "address": "aws_elasticsearch_domain_policy.monitoring-framework-policy", + "change": { + "actions": [ + "create", + ], + "after": { + "access_policies": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "domain_name": "tg-dev-es", + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "monitoring-framework-policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_elasticsearch_domain_policy", + }, + "aws_elb.weblb": { + "address": "aws_elb.weblb", + "change": { + "actions": [ + "create", + ], + "after": { + "access_logs": [], + "connection_draining": true, + "connection_draining_timeout": 400, + "cross_zone_load_balancing": true, + "health_check": [ + { + "healthy_threshold": 2, + "interval": 30, + "target": "HTTP:8000/", + "timeout": 3, + "unhealthy_threshold": 2, + }, + ], + "idle_timeout": 400, + "listener": [ + { + "instance_port": 8000, + "instance_protocol": "http", + "lb_port": 80, + "lb_protocol": "http", + "ssl_certificate_id": "", + }, + ], + "name": "weblb-terraform-elb", + "name_prefix": null, + "tags": { + "Name": "foobar-terraform-elb", + }, + }, + "after_unknown": { + "access_logs": [], + "arn": true, + "availability_zones": true, + "dns_name": true, + "health_check": [ + {}, + ], + "id": true, + "instances": true, + "internal": true, + "listener": [ + {}, + ], + "security_groups": true, + "source_security_group": true, + "source_security_group_id": true, + "subnets": true, + "tags": {}, + "zone_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "weblb", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_elb", + }, + "aws_flow_log.vpcflowlogs": { + "address": "aws_flow_log.vpcflowlogs", + "change": { + "actions": [ + "create", + ], + "after": { + "eni_id": null, + "iam_role_arn": null, + "log_destination_type": "s3", + "max_aggregation_interval": 600, + "subnet_id": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "traffic_type": "ALL", + }, + "after_unknown": { + "arn": true, + "id": true, + "log_destination": true, + "log_format": true, + "log_group_name": true, + "tags": {}, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "vpcflowlogs", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_flow_log", + }, + "aws_iam_access_key.user": { + "address": "aws_iam_access_key.user", + "change": { + "actions": [ + "create", + ], + "after": { + "pgp_key": null, + "user": "123456789123-acme-dev-user", + }, + "after_unknown": { + "create_date": true, + "encrypted_secret": true, + "id": true, + "key_fingerprint": true, + "secret": true, + "ses_smtp_password_v4": true, + "status": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "user", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_access_key", + }, + "aws_iam_instance_profile.ec2profile": { + "address": "aws_iam_instance_profile.ec2profile", + "change": { + "actions": [ + "create", + ], + "after": { + "name": "123456789123-acme-dev-profile", + "name_prefix": null, + "path": "/", + "role": "123456789123-acme-dev-role", + "tags": null, + }, + "after_unknown": { + "arn": true, + "create_date": true, + "id": true, + "unique_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ec2profile", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_instance_profile", + }, + "aws_iam_role.ec2role": { + "address": "aws_iam_role.ec2role", + "change": { + "actions": [ + "create", + ], + "after": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-role", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-role", + }, + }, + "after_unknown": { + "arn": true, + "create_date": true, + "id": true, + "inline_policy": true, + "managed_policy_arns": true, + "tags": {}, + "unique_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ec2role", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role", + }, + "aws_iam_role.iam_for_eks": { + "address": "aws_iam_role.iam_for_eks", + "change": { + "actions": [ + "create", + ], + "after": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-iam-for-eks", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + "after_unknown": { + "arn": true, + "create_date": true, + "id": true, + "inline_policy": true, + "managed_policy_arns": true, + "unique_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "iam_for_eks", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role", + }, + "aws_iam_role.iam_for_lambda": { + "address": "aws_iam_role.iam_for_lambda", + "change": { + "actions": [ + "create", + ], + "after": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-analysis-lambda", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + "after_unknown": { + "arn": true, + "create_date": true, + "id": true, + "inline_policy": true, + "managed_policy_arns": true, + "unique_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "iam_for_lambda", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role", + }, + "aws_iam_role_policy.ec2policy": { + "address": "aws_iam_role_policy.ec2policy", + "change": { + "actions": [ + "create", + ], + "after": { + "name": "123456789123-acme-dev-policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + "after_unknown": { + "id": true, + "role": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ec2policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role_policy", + }, + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy": { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy", + "change": { + "actions": [ + "create", + ], + "after": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "policy_attachment-AmazonEKSClusterPolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role_policy_attachment", + }, + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy": { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy", + "change": { + "actions": [ + "create", + ], + "after": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "policy_attachment-AmazonEKSServicePolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role_policy_attachment", + }, + "aws_iam_user.user": { + "address": "aws_iam_user.user", + "change": { + "actions": [ + "create", + ], + "after": { + "force_destroy": true, + "name": "123456789123-acme-dev-user", + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-user", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "tags": {}, + "unique_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "user", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_user", + }, + "aws_iam_user_policy.userpolicy": { + "address": "aws_iam_user_policy.userpolicy", + "change": { + "actions": [ + "create", + ], + "after": { + "name": "excess_policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + "user": "123456789123-acme-dev-user", + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "userpolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_user_policy", + }, + "aws_instance.db_app": { + "address": "aws_instance.db_app", + "change": { + "actions": [ + "create", + ], + "after": { + "ami": "ami-06d584c1805ad64fb", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": "123456789123-acme-dev-profile", + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-dbapp", + }, + "timeouts": null, + "user_data_base64": null, + "volume_tags": null, + }, + "after_unknown": { + "arn": true, + "associate_public_ip_address": true, + "availability_zone": true, + "cpu_core_count": true, + "cpu_threads_per_core": true, + "credit_specification": [], + "ebs_block_device": true, + "enclave_options": true, + "ephemeral_block_device": true, + "host_id": true, + "id": true, + "instance_state": true, + "ipv6_address_count": true, + "ipv6_addresses": true, + "key_name": true, + "metadata_options": true, + "network_interface": true, + "outpost_arn": true, + "password_data": true, + "placement_group": true, + "primary_network_interface_id": true, + "private_dns": true, + "private_ip": true, + "public_dns": true, + "public_ip": true, + "root_block_device": true, + "secondary_private_ips": true, + "security_groups": true, + "subnet_id": true, + "tags": {}, + "tenancy": true, + "user_data": true, + "vpc_security_group_ids": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "db_app", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_instance", + }, + "aws_instance.web_host": { + "address": "aws_instance.web_host", + "change": { + "actions": [ + "create", + ], + "after": { + "ami": "ami-09a5b0b7edf08843d", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": null, + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-ec2", + }, + "timeouts": null, + "user_data": "44c6c808e6449ee36dfcfc4ebd66c1b9634b40f2", + "user_data_base64": null, + "volume_tags": null, + }, + "after_unknown": { + "arn": true, + "associate_public_ip_address": true, + "availability_zone": true, + "cpu_core_count": true, + "cpu_threads_per_core": true, + "credit_specification": [], + "ebs_block_device": true, + "enclave_options": true, + "ephemeral_block_device": true, + "host_id": true, + "id": true, + "instance_state": true, + "ipv6_address_count": true, + "ipv6_addresses": true, + "key_name": true, + "metadata_options": true, + "network_interface": true, + "outpost_arn": true, + "password_data": true, + "placement_group": true, + "primary_network_interface_id": true, + "private_dns": true, + "private_ip": true, + "public_dns": true, + "public_ip": true, + "root_block_device": true, + "secondary_private_ips": true, + "security_groups": true, + "subnet_id": true, + "tags": {}, + "tenancy": true, + "vpc_security_group_ids": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_host", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_instance", + }, + "aws_internet_gateway.web_igw": { + "address": "aws_internet_gateway.web_igw", + "change": { + "actions": [ + "create", + ], + "after": { + "tags": { + "Name": "123456789123-acme-dev-igw", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "owner_id": true, + "tags": {}, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_igw", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_internet_gateway", + }, + "aws_kms_alias.logs_key_alias": { + "address": "aws_kms_alias.logs_key_alias", + "change": { + "actions": [ + "create", + ], + "after": { + "name": "alias/123456789123-acme-dev-logs-bucket-key", + "name_prefix": null, + }, + "after_unknown": { + "arn": true, + "id": true, + "target_key_arn": true, + "target_key_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "logs_key_alias", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_kms_alias", + }, + "aws_kms_key.logs_key": { + "address": "aws_kms_key.logs_key", + "change": { + "actions": [ + "create", + ], + "after": { + "customer_master_key_spec": "SYMMETRIC_DEFAULT", + "deletion_window_in_days": 7, + "description": "123456789123-acme-dev-logs bucket key", + "enable_key_rotation": false, + "is_enabled": true, + "key_usage": "ENCRYPT_DECRYPT", + "tags": null, + }, + "after_unknown": { + "arn": true, + "id": true, + "key_id": true, + "policy": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "logs_key", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_kms_key", + }, + "aws_lambda_function.analysis_lambda": { + "address": "aws_lambda_function.analysis_lambda", + "change": { + "actions": [ + "create", + ], + "after": { + "code_signing_config_arn": null, + "dead_letter_config": [], + "description": null, + "environment": [ + { + "variables": { + "access_key": "{{REDACTED}}", + "secret_key": "{{REDACTED}}", + }, + }, + ], + "file_system_config": [], + "filename": "resources/lambda_function_payload.zip", + "function_name": "123456789123-acme-dev-analysis", + "handler": "exports.test", + "image_config": [], + "image_uri": null, + "kms_key_arn": null, + "layers": null, + "memory_size": 128, + "package_type": "Zip", + "publish": false, + "reserved_concurrent_executions": -1, + "runtime": "nodejs12.x", + "s3_bucket": null, + "s3_key": null, + "s3_object_version": null, + "source_code_hash": "Fne61Y/F2pmVywaVqIYcztFMK3LNeMJKpWFNnxDdGTw=", + "tags": null, + "timeout": 3, + "timeouts": null, + "vpc_config": [], + }, + "after_unknown": { + "arn": true, + "dead_letter_config": [], + "environment": [ + { + "variables": {}, + }, + ], + "file_system_config": [], + "id": true, + "image_config": [], + "invoke_arn": true, + "last_modified": true, + "qualified_arn": true, + "role": true, + "signing_job_arn": true, + "signing_profile_version_arn": true, + "source_code_size": true, + "tracing_config": true, + "version": true, + "vpc_config": [], + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "analysis_lambda", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_lambda_function", + }, + "aws_neptune_cluster.default": { + "address": "aws_neptune_cluster.default", + "change": { + "actions": [ + "create", + ], + "after": { + "apply_immediately": true, + "backup_retention_period": 5, + "cluster_identifier": "neptunedb1", + "deletion_protection": null, + "enable_cloudwatch_logs_exports": null, + "engine": "neptune", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": false, + "iam_roles": null, + "neptune_cluster_parameter_group_name": "default.neptune1", + "port": 8182, + "preferred_backup_window": "07:00-09:00", + "replication_source_identifier": null, + "skip_final_snapshot": true, + "snapshot_identifier": null, + "storage_encrypted": false, + "tags": null, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zones": true, + "cluster_identifier_prefix": true, + "cluster_members": true, + "cluster_resource_id": true, + "endpoint": true, + "engine_version": true, + "hosted_zone_id": true, + "id": true, + "kms_key_arn": true, + "neptune_subnet_group_name": true, + "preferred_maintenance_window": true, + "reader_endpoint": true, + "vpc_security_group_ids": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_neptune_cluster", + }, + "aws_neptune_cluster_instance.default[0]": { + "address": "aws_neptune_cluster_instance.default[0]", + "change": { + "actions": [ + "create", + ], + "after": { + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "engine": "neptune", + "instance_class": "db.t3.medium", + "neptune_parameter_group_name": "default.neptune1", + "port": 8182, + "promotion_tier": 0, + "publicly_accessible": false, + "tags": null, + "timeouts": null, + }, + "after_unknown": { + "address": true, + "arn": true, + "availability_zone": true, + "cluster_identifier": true, + "dbi_resource_id": true, + "endpoint": true, + "engine_version": true, + "id": true, + "identifier": true, + "identifier_prefix": true, + "kms_key_arn": true, + "neptune_subnet_group_name": true, + "preferred_backup_window": true, + "preferred_maintenance_window": true, + "storage_encrypted": true, + "writer": true, + }, + "before": null, + }, + "deposed": "", + "index": 0, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_neptune_cluster_instance", + }, + "aws_neptune_cluster_snapshot.default": { + "address": "aws_neptune_cluster_snapshot.default", + "change": { + "actions": [ + "create", + ], + "after": { + "db_cluster_snapshot_identifier": "resourcetestsnapshot1", + "timeouts": null, + }, + "after_unknown": { + "allocated_storage": true, + "availability_zones": true, + "db_cluster_identifier": true, + "db_cluster_snapshot_arn": true, + "engine": true, + "engine_version": true, + "id": true, + "kms_key_id": true, + "license_model": true, + "port": true, + "snapshot_type": true, + "source_db_cluster_snapshot_arn": true, + "status": true, + "storage_encrypted": true, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_neptune_cluster_snapshot", + }, + "aws_network_interface.web-eni": { + "address": "aws_network_interface.web-eni", + "change": { + "actions": [ + "create", + ], + "after": { + "description": null, + "private_ips": [ + "172.16.10.100", + ], + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-primary_network_interface", + }, + }, + "after_unknown": { + "attachment": true, + "id": true, + "ipv6_address_count": true, + "ipv6_addresses": true, + "mac_address": true, + "outpost_arn": true, + "private_dns_name": true, + "private_ip": true, + "private_ips": [ + false, + ], + "private_ips_count": true, + "security_groups": true, + "subnet_id": true, + "tags": {}, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web-eni", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_network_interface", + }, + "aws_route.public_internet_gateway": { + "address": "aws_route.public_internet_gateway", + "change": { + "actions": [ + "create", + ], + "after": { + "carrier_gateway_id": null, + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": null, + "destination_prefix_list_id": null, + "egress_only_gateway_id": null, + "local_gateway_id": null, + "nat_gateway_id": null, + "timeouts": { + "create": "5m", + "delete": null, + }, + "transit_gateway_id": null, + "vpc_endpoint_id": null, + "vpc_peering_connection_id": null, + }, + "after_unknown": { + "gateway_id": true, + "id": true, + "instance_id": true, + "instance_owner_id": true, + "network_interface_id": true, + "origin": true, + "route_table_id": true, + "state": true, + "timeouts": {}, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "public_internet_gateway", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_route", + }, + "aws_route_table.web_rtb": { + "address": "aws_route_table.web_rtb", + "change": { + "actions": [ + "create", + ], + "after": { + "tags": { + "Name": "123456789123-acme-dev-rtb", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "owner_id": true, + "propagating_vgws": true, + "route": true, + "tags": {}, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_rtb", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_route_table", + }, + "aws_route_table_association.rtbassoc": { + "address": "aws_route_table_association.rtbassoc", + "change": { + "actions": [ + "create", + ], + "after": { + "gateway_id": null, + }, + "after_unknown": { + "id": true, + "route_table_id": true, + "subnet_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "rtbassoc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_route_table_association", + }, + "aws_route_table_association.rtbassoc2": { + "address": "aws_route_table_association.rtbassoc2", + "change": { + "actions": [ + "create", + ], + "after": { + "gateway_id": null, + }, + "after_unknown": { + "id": true, + "route_table_id": true, + "subnet_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "rtbassoc2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_route_table_association", + }, + "aws_s3_bucket.data": { + "address": "aws_s3_bucket.data", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "public-read", + "bucket": "123456789123-acme-dev-data", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-data", + }, + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "tags": {}, + "versioning": true, + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "data", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.data_science": { + "address": "aws_s3_bucket.data_science", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "bucket": "123456789123-acme-dev-data-science", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [ + { + "target_prefix": "log/", + }, + ], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": null, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [ + { + "target_bucket": true, + }, + ], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "versioning": [ + {}, + ], + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "data_science", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.financials": { + "address": "aws_s3_bucket.financials", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "bucket": "123456789123-acme-dev-financials", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-financials", + }, + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "tags": {}, + "versioning": true, + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "financials", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.flowbucket": { + "address": "aws_s3_bucket.flowbucket", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "bucket": "123456789123-acme-dev-flowlogs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "tags": {}, + "versioning": true, + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "flowbucket", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.logs": { + "address": "aws_s3_bucket.logs", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "log-delivery-write", + "bucket": "123456789123-acme-dev-logs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "sse_algorithm": "aws:kms", + }, + ], + "bucket_key_enabled": null, + }, + ], + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-logs", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "kms_master_key_id": true, + }, + ], + }, + ], + }, + ], + "tags": {}, + "versioning": [ + {}, + ], + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "logs", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + "aws_s3_bucket.operations": { + "address": "aws_s3_bucket.operations", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "bucket": "123456789123-acme-dev-operations", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-operations", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "tags": {}, + "versioning": [ + {}, + ], + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "operations", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + "aws_s3_bucket_object.data_object": { + "address": "aws_s3_bucket_object.data_object", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "cache_control": null, + "content": null, + "content_base64": null, + "content_disposition": null, + "content_encoding": null, + "content_language": null, + "force_destroy": false, + "key": "customer-master.xlsx", + "metadata": null, + "object_lock_legal_hold_status": null, + "object_lock_mode": null, + "object_lock_retain_until_date": null, + "source": "resources/customer-master.xlsx", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-customer-master", + }, + "website_redirect": null, + }, + "after_unknown": { + "bucket": true, + "bucket_key_enabled": true, + "content_type": true, + "etag": true, + "id": true, + "kms_key_id": true, + "server_side_encryption": true, + "storage_class": true, + "tags": {}, + "version_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "data_object", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket_object", + }, + "aws_security_group.default": { + "address": "aws_security_group.default", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "Managed by Terraform", + "name": "123456789123-acme-dev-rds-sg", + "revoke_rules_on_delete": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds-sg", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "egress": true, + "id": true, + "ingress": true, + "name_prefix": true, + "owner_id": true, + "tags": {}, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_security_group", + }, + "aws_security_group.web-node": { + "address": "aws_security_group.web-node", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "123456789123-acme-dev Security Group", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0, + }, + ], + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 22, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 22, + }, + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 80, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 80, + }, + ], + "name": "123456789123-acme-dev-sg", + "revoke_rules_on_delete": false, + "tags": null, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "egress": [ + { + "cidr_blocks": [ + false, + ], + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "security_groups": [], + }, + ], + "id": true, + "ingress": [ + { + "cidr_blocks": [ + false, + ], + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "security_groups": [], + }, + { + "cidr_blocks": [ + false, + ], + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "security_groups": [], + }, + ], + "name_prefix": true, + "owner_id": true, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web-node", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_security_group", + }, + "aws_security_group_rule.egress": { + "address": "aws_security_group_rule.egress", + "change": { + "actions": [ + "create", + ], + "after": { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": null, + "from_port": 0, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "-1", + "self": false, + "to_port": 0, + "type": "egress", + }, + "after_unknown": { + "cidr_blocks": [ + false, + ], + "id": true, + "security_group_id": true, + "source_security_group_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "egress", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_security_group_rule", + }, + "aws_security_group_rule.ingress": { + "address": "aws_security_group_rule.ingress", + "change": { + "actions": [ + "create", + ], + "after": { + "cidr_blocks": [ + "172.16.0.0/16", + ], + "description": null, + "from_port": 3306, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "tcp", + "self": false, + "to_port": 3306, + "type": "ingress", + }, + "after_unknown": { + "cidr_blocks": [ + false, + ], + "id": true, + "security_group_id": true, + "source_security_group_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ingress", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_security_group_rule", + }, + "aws_subnet.eks_subnet1": { + "address": "aws_subnet.eks_subnet1", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "10.10.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zone_id": true, + "id": true, + "ipv6_cidr_block_association_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "eks_subnet1", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_subnet", + }, + "aws_subnet.eks_subnet2": { + "address": "aws_subnet.eks_subnet2", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "10.10.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zone_id": true, + "id": true, + "ipv6_cidr_block_association_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "eks_subnet2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_subnet", + }, + "aws_subnet.web_subnet": { + "address": "aws_subnet.web_subnet", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "172.16.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zone_id": true, + "id": true, + "ipv6_cidr_block_association_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_subnet", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_subnet", + }, + "aws_subnet.web_subnet2": { + "address": "aws_subnet.web_subnet2", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "172.16.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet2", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet2", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zone_id": true, + "id": true, + "ipv6_cidr_block_association_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + "vpc_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_subnet2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_subnet", + }, + "aws_volume_attachment.ebs_att": { + "address": "aws_volume_attachment.ebs_att", + "change": { + "actions": [ + "create", + ], + "after": { + "device_name": "/dev/sdh", + "force_detach": null, + "skip_destroy": null, + }, + "after_unknown": { + "id": true, + "instance_id": true, + "volume_id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "ebs_att", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_volume_attachment", + }, + "aws_vpc.eks_vpc": { + "address": "aws_vpc.eks_vpc", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.10.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + }, + "after_unknown": { + "arn": true, + "default_network_acl_id": true, + "default_route_table_id": true, + "default_security_group_id": true, + "dhcp_options_id": true, + "enable_classiclink": true, + "enable_classiclink_dns_support": true, + "id": true, + "ipv6_association_id": true, + "ipv6_cidr_block": true, + "main_route_table_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "eks_vpc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_vpc", + }, + "aws_vpc.web_vpc": { + "address": "aws_vpc.web_vpc", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "172.16.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-vpc", + }, + }, + "after_unknown": { + "arn": true, + "default_network_acl_id": true, + "default_route_table_id": true, + "default_security_group_id": true, + "dhcp_options_id": true, + "enable_classiclink": true, + "enable_classiclink_dns_support": true, + "id": true, + "ipv6_association_id": true, + "ipv6_cidr_block": true, + "main_route_table_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "web_vpc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_vpc", + }, + "null_resource.push_image": { + "address": "null_resource.push_image", + "change": { + "actions": [ + "create", + ], + "after": { + "triggers": null, + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "deposed": "", + "index": null, + "mode": "managed", + "module_address": "", + "name": "push_image", + "provider_name": "registry.terraform.io/hashicorp/null", + "type": "null_resource", + }, +} + +output_changes = { + "db_app_public_dns": { + "change": { + "actions": [ + "create", + ], + "after": undefined, + "after_unknown": true, + "before": null, + }, + "name": "db_app_public_dns", + }, + "db_endpoint": { + "change": { + "actions": [ + "create", + ], + "after": undefined, + "after_unknown": true, + "before": null, + }, + "name": "db_endpoint", + }, + "ec2_public_dns": { + "change": { + "actions": [ + "create", + ], + "after": undefined, + "after_unknown": true, + "before": null, + }, + "name": "ec2_public_dns", + }, + "endpoint": { + "change": { + "actions": [ + "create", + ], + "after": undefined, + "after_unknown": true, + "before": null, + }, + "name": "endpoint", + }, + "kubeconfig-certificate-authority-data": { + "change": { + "actions": [ + "create", + ], + "after": undefined, + "after_unknown": true, + "before": null, + }, + "name": "kubeconfig-certificate-authority-data", + }, + "public_subnet": { + "change": { + "actions": [ + "create", + ], + "after": undefined, + "after_unknown": true, + "before": null, + }, + "name": "public_subnet", + }, + "public_subnet2": { + "change": { + "actions": [ + "create", + ], + "after": undefined, + "after_unknown": true, + "before": null, + }, + "name": "public_subnet2", + }, + "secret": { + "change": { + "actions": [ + "create", + ], + "after": undefined, + "after_unknown": true, + "before": null, + }, + "name": "secret", + }, + "username": { + "change": { + "actions": [ + "create", + ], + "after": "123456789123-acme-dev-user", + "after_unknown": false, + "before": null, + }, + "name": "username", + }, + "vpc_id": { + "change": { + "actions": [ + "create", + ], + "after": undefined, + "after_unknown": true, + "before": null, + }, + "name": "vpc_id", + }, +} + +raw = { + "configuration": { + "provider_config": { + "aws": { + "expressions": { + "profile": { + "references": [ + "var.profile", + ], + }, + "region": { + "constant_value": "us-west-1", + }, + }, + "name": "aws", + }, + "aws.plain_text_access_keys_provider": { + "alias": "plain_text_access_keys_provider", + "expressions": { + "access_key": { + "constant_value": "{{REDACTED}}", + }, + "region": { + "constant_value": "us-west-1", + }, + "secret_key": { + "constant_value": "{{REDACTED}}", + }, + }, + "name": "aws", + }, + }, + "root_module": { + "outputs": { + "db_app_public_dns": { + "description": "DB Public DNS name", + "expression": { + "references": [ + "aws_instance.db_app", + ], + }, + }, + "db_endpoint": { + "description": "DB Endpoint", + "expression": { + "references": [ + "aws_db_instance.default", + ], + }, + }, + "ec2_public_dns": { + "description": "Web Host Public DNS name", + "expression": { + "references": [ + "aws_instance.web_host", + ], + }, + }, + "endpoint": { + "expression": { + "references": [ + "aws_eks_cluster.eks_cluster", + ], + }, + }, + "kubeconfig-certificate-authority-data": { + "expression": { + "references": [ + "aws_eks_cluster.eks_cluster", + ], + }, + }, + "public_subnet": { + "description": "The ID of the Public subnet", + "expression": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + }, + "public_subnet2": { + "description": "The ID of the Public subnet", + "expression": { + "references": [ + "aws_subnet.web_subnet2", + ], + }, + }, + "secret": { + "expression": { + "references": [ + "aws_iam_access_key.user", + ], + }, + }, + "username": { + "expression": { + "references": [ + "aws_iam_user.user", + ], + }, + }, + "vpc_id": { + "description": "The ID of the VPC", + "expression": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + }, + "resources": [ + { + "address": "aws_db_instance.default", + "expressions": { + "allocated_storage": { + "constant_value": "20", + }, + "apply_immediately": { + "constant_value": true, + }, + "backup_retention_period": { + "constant_value": 0, + }, + "db_subnet_group_name": { + "references": [ + "aws_db_subnet_group.default", + ], + }, + "engine": { + "constant_value": "mysql", + }, + "engine_version": { + "constant_value": "8.0", + }, + "identifier": { + "references": [ + "local.resource_prefix", + ], + }, + "instance_class": { + "constant_value": "db.t3.micro", + }, + "monitoring_interval": { + "constant_value": 0, + }, + "multi_az": { + "constant_value": false, + }, + "name": { + "references": [ + "var.dbname", + ], + }, + "option_group_name": { + "references": [ + "aws_db_option_group.default", + ], + }, + "parameter_group_name": { + "references": [ + "aws_db_parameter_group.default", + ], + }, + "password": { + "references": [ + "var.password", + ], + }, + "publicly_accessible": { + "constant_value": true, + }, + "skip_final_snapshot": { + "constant_value": true, + }, + "storage_encrypted": { + "constant_value": false, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "username": { + "constant_value": "admin", + }, + "vpc_security_group_ids": { + "references": [ + "aws_security_group.default", + ], + }, + }, + "mode": "managed", + "name": "default", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_db_instance", + }, + { + "address": "aws_db_option_group.default", + "expressions": { + "engine_name": { + "constant_value": "mysql", + }, + "major_engine_version": { + "constant_value": "8.0", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "option_group_description": { + "constant_value": "Terraform OG", + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "default", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_db_option_group", + }, + { + "address": "aws_db_parameter_group.default", + "expressions": { + "description": { + "constant_value": "Terraform PG", + }, + "family": { + "constant_value": "mysql8.0", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "parameter": [ + { + "apply_method": { + "constant_value": "immediate", + }, + "name": { + "constant_value": "character_set_client", + }, + "value": { + "constant_value": "utf8", + }, + }, + { + "apply_method": { + "constant_value": "immediate", + }, + "name": { + "constant_value": "character_set_server", + }, + "value": { + "constant_value": "utf8", + }, + }, + ], + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "default", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_db_parameter_group", + }, + { + "address": "aws_db_subnet_group.default", + "expressions": { + "description": { + "constant_value": "Terraform DB Subnet Group", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "subnet_ids": { + "references": [ + "aws_subnet.web_subnet", + "aws_subnet.web_subnet2", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "default", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_db_subnet_group", + }, + { + "address": "aws_ebs_snapshot.example_snapshot", + "expressions": { + "description": { + "references": [ + "local.resource_prefix", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "volume_id": { + "references": [ + "aws_ebs_volume.web_host_storage", + ], + }, + }, + "mode": "managed", + "name": "example_snapshot", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_ebs_snapshot", + }, + { + "address": "aws_ebs_volume.web_host_storage", + "expressions": { + "availability_zone": { + "references": [ + "var.availability_zone", + ], + }, + "size": { + "constant_value": 1, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "web_host_storage", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_ebs_volume", + }, + { + "address": "aws_ecr_repository.repository", + "expressions": { + "image_tag_mutability": { + "constant_value": "MUTABLE", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "repository", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_ecr_repository", + }, + { + "address": "aws_eks_cluster.eks_cluster", + "depends_on": [ + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy", + "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy", + ], + "expressions": { + "name": { + "references": [ + "local.eks_name", + ], + }, + "role_arn": { + "references": [ + "aws_iam_role.iam_for_eks", + ], + }, + "vpc_config": [ + { + "endpoint_private_access": { + "constant_value": true, + }, + "subnet_ids": { + "references": [ + "aws_subnet.eks_subnet1", + "aws_subnet.eks_subnet2", + ], + }, + }, + ], + }, + "mode": "managed", + "name": "eks_cluster", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_eks_cluster", + }, + { + "address": "aws_elasticsearch_domain.monitoring-framework", + "expressions": { + "cluster_config": [ + { + "dedicated_master_count": { + "constant_value": 1, + }, + "dedicated_master_enabled": { + "constant_value": false, + }, + "dedicated_master_type": { + "constant_value": "m4.large.elasticsearch", + }, + "instance_count": { + "constant_value": 1, + }, + "instance_type": { + "constant_value": "t2.small.elasticsearch", + }, + }, + ], + "domain_name": { + "references": [ + "var.environment", + ], + }, + "ebs_options": [ + { + "ebs_enabled": { + "constant_value": true, + }, + "volume_size": { + "constant_value": 30, + }, + }, + ], + "elasticsearch_version": { + "constant_value": "2.3", + }, + }, + "mode": "managed", + "name": "monitoring-framework", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_elasticsearch_domain", + }, + { + "address": "aws_elasticsearch_domain_policy.monitoring-framework-policy", + "expressions": { + "access_policies": { + "references": [ + "data.aws_iam_policy_document.policy", + ], + }, + "domain_name": { + "references": [ + "aws_elasticsearch_domain.monitoring-framework", + ], + }, + }, + "mode": "managed", + "name": "monitoring-framework-policy", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_elasticsearch_domain_policy", + }, + { + "address": "aws_elb.weblb", + "expressions": { + "connection_draining": { + "constant_value": true, + }, + "connection_draining_timeout": { + "constant_value": 400, + }, + "cross_zone_load_balancing": { + "constant_value": true, + }, + "health_check": [ + { + "healthy_threshold": { + "constant_value": 2, + }, + "interval": { + "constant_value": 30, + }, + "target": { + "constant_value": "HTTP:8000/", + }, + "timeout": { + "constant_value": 3, + }, + "unhealthy_threshold": { + "constant_value": 2, + }, + }, + ], + "idle_timeout": { + "constant_value": 400, + }, + "instances": { + "references": [ + "aws_instance.web_host", + ], + }, + "listener": [ + { + "instance_port": { + "constant_value": 8000, + }, + "instance_protocol": { + "constant_value": "http", + }, + "lb_port": { + "constant_value": 80, + }, + "lb_protocol": { + "constant_value": "http", + }, + }, + ], + "name": { + "constant_value": "weblb-terraform-elb", + }, + "security_groups": { + "references": [ + "aws_security_group.web-node", + ], + }, + "subnets": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + "tags": { + "constant_value": { + "Name": "foobar-terraform-elb", + }, + }, + }, + "mode": "managed", + "name": "weblb", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_elb", + }, + { + "address": "aws_flow_log.vpcflowlogs", + "expressions": { + "log_destination": { + "references": [ + "aws_s3_bucket.flowbucket", + ], + }, + "log_destination_type": { + "constant_value": "s3", + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "traffic_type": { + "constant_value": "ALL", + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "mode": "managed", + "name": "vpcflowlogs", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_flow_log", + }, + { + "address": "aws_iam_access_key.user", + "expressions": { + "user": { + "references": [ + "aws_iam_user.user", + ], + }, + }, + "mode": "managed", + "name": "user", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_access_key", + }, + { + "address": "aws_iam_instance_profile.ec2profile", + "expressions": { + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "role": { + "references": [ + "aws_iam_role.ec2role", + ], + }, + }, + "mode": "managed", + "name": "ec2profile", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_instance_profile", + }, + { + "address": "aws_iam_role.ec2role", + "expressions": { + "assume_role_policy": { + "constant_value": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "path": { + "constant_value": "/", + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "ec2role", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_role", + }, + { + "address": "aws_iam_role.iam_for_eks", + "expressions": { + "assume_role_policy": { + "references": [ + "data.aws_iam_policy_document.iam_policy_eks", + ], + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "iam_for_eks", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_role", + }, + { + "address": "aws_iam_role.iam_for_lambda", + "expressions": { + "assume_role_policy": { + "constant_value": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "iam_for_lambda", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_role", + }, + { + "address": "aws_iam_role_policy.ec2policy", + "expressions": { + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "policy": { + "constant_value": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + "role": { + "references": [ + "aws_iam_role.ec2role", + ], + }, + }, + "mode": "managed", + "name": "ec2policy", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_role_policy", + }, + { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy", + "expressions": { + "policy_arn": { + "constant_value": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + }, + "role": { + "references": [ + "aws_iam_role.iam_for_eks", + ], + }, + }, + "mode": "managed", + "name": "policy_attachment-AmazonEKSClusterPolicy", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_role_policy_attachment", + }, + { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy", + "expressions": { + "policy_arn": { + "constant_value": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + }, + "role": { + "references": [ + "aws_iam_role.iam_for_eks", + ], + }, + }, + "mode": "managed", + "name": "policy_attachment-AmazonEKSServicePolicy", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_role_policy_attachment", + }, + { + "address": "aws_iam_user.user", + "expressions": { + "force_destroy": { + "constant_value": true, + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "user", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_user", + }, + { + "address": "aws_iam_user_policy.userpolicy", + "expressions": { + "name": { + "constant_value": "excess_policy", + }, + "policy": { + "constant_value": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + "user": { + "references": [ + "aws_iam_user.user", + ], + }, + }, + "mode": "managed", + "name": "userpolicy", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_user_policy", + }, + { + "address": "aws_instance.db_app", + "expressions": { + "ami": { + "references": [ + "data.aws_ami.amazon-linux-2", + ], + }, + "iam_instance_profile": { + "references": [ + "aws_iam_instance_profile.ec2profile", + ], + }, + "instance_type": { + "constant_value": "t2.nano", + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "user_data": { + "references": [ + "aws_db_instance.default", + "aws_db_instance.default", + "var.password", + "aws_db_instance.default", + ], + }, + "vpc_security_group_ids": { + "references": [ + "aws_security_group.web-node", + ], + }, + }, + "mode": "managed", + "name": "db_app", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_instance", + }, + { + "address": "aws_instance.web_host", + "expressions": { + "ami": { + "references": [ + "var.ami", + ], + }, + "instance_type": { + "constant_value": "t2.nano", + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "user_data": { + "constant_value": "#! /bin/bash\nsudo apt-get update\nsudo apt-get install -y apache2\nsudo systemctl start apache2\nsudo systemctl enable apache2\nexport AWS_ACCESS_KEY_ID={{REDACTED}}\nexport AWS_SECRET_ACCESS_KEY={{REDACTED}}\nexport AWS_DEFAULT_REGION=us-west-2\necho \"

Deployed via Terraform

\" | sudo tee /var/www/html/index.html\n", + }, + "vpc_security_group_ids": { + "references": [ + "aws_security_group.web-node", + ], + }, + }, + "mode": "managed", + "name": "web_host", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_instance", + }, + { + "address": "aws_internet_gateway.web_igw", + "expressions": { + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "mode": "managed", + "name": "web_igw", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_internet_gateway", + }, + { + "address": "aws_kms_alias.logs_key_alias", + "expressions": { + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "target_key_id": { + "references": [ + "aws_kms_key.logs_key", + ], + }, + }, + "mode": "managed", + "name": "logs_key_alias", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_kms_alias", + }, + { + "address": "aws_kms_key.logs_key", + "expressions": { + "deletion_window_in_days": { + "constant_value": 7, + }, + "description": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "logs_key", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_kms_key", + }, + { + "address": "aws_lambda_function.analysis_lambda", + "expressions": { + "environment": [ + { + "variables": { + "constant_value": { + "access_key": "{{REDACTED}}", + "secret_key": "{{REDACTED}}", + }, + }, + }, + ], + "filename": { + "constant_value": "resources/lambda_function_payload.zip", + }, + "function_name": { + "references": [ + "local.resource_prefix", + ], + }, + "handler": { + "constant_value": "exports.test", + }, + "role": { + "references": [ + "aws_iam_role.iam_for_lambda", + ], + }, + "runtime": { + "constant_value": "nodejs12.x", + }, + "source_code_hash": {}, + }, + "mode": "managed", + "name": "analysis_lambda", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_lambda_function", + }, + { + "address": "aws_neptune_cluster.default", + "expressions": { + "apply_immediately": { + "constant_value": true, + }, + "backup_retention_period": { + "constant_value": 5, + }, + "cluster_identifier": { + "references": [ + "var.neptune-dbname", + ], + }, + "engine": { + "constant_value": "neptune", + }, + "iam_database_authentication_enabled": { + "constant_value": false, + }, + "preferred_backup_window": { + "constant_value": "07:00-09:00", + }, + "skip_final_snapshot": { + "constant_value": true, + }, + "storage_encrypted": { + "constant_value": false, + }, + }, + "mode": "managed", + "name": "default", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_neptune_cluster", + }, + { + "address": "aws_neptune_cluster_instance.default", + "count_expression": { + "constant_value": 1, + }, + "expressions": { + "apply_immediately": { + "constant_value": true, + }, + "cluster_identifier": { + "references": [ + "aws_neptune_cluster.default", + ], + }, + "engine": { + "constant_value": "neptune", + }, + "instance_class": { + "constant_value": "db.t3.medium", + }, + }, + "mode": "managed", + "name": "default", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_neptune_cluster_instance", + }, + { + "address": "aws_neptune_cluster_snapshot.default", + "expressions": { + "db_cluster_identifier": { + "references": [ + "aws_neptune_cluster.default", + ], + }, + "db_cluster_snapshot_identifier": { + "constant_value": "resourcetestsnapshot1", + }, + }, + "mode": "managed", + "name": "default", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_neptune_cluster_snapshot", + }, + { + "address": "aws_network_interface.web-eni", + "expressions": { + "private_ips": { + "constant_value": [ + "172.16.10.100", + ], + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "web-eni", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_network_interface", + }, + { + "address": "aws_route.public_internet_gateway", + "expressions": { + "destination_cidr_block": { + "constant_value": "0.0.0.0/0", + }, + "gateway_id": { + "references": [ + "aws_internet_gateway.web_igw", + ], + }, + "route_table_id": { + "references": [ + "aws_route_table.web_rtb", + ], + }, + "timeouts": {}, + }, + "mode": "managed", + "name": "public_internet_gateway", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_route", + }, + { + "address": "aws_route_table.web_rtb", + "expressions": { + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "mode": "managed", + "name": "web_rtb", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_route_table", + }, + { + "address": "aws_route_table_association.rtbassoc", + "expressions": { + "route_table_id": { + "references": [ + "aws_route_table.web_rtb", + ], + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet", + ], + }, + }, + "mode": "managed", + "name": "rtbassoc", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_route_table_association", + }, + { + "address": "aws_route_table_association.rtbassoc2", + "expressions": { + "route_table_id": { + "references": [ + "aws_route_table.web_rtb", + ], + }, + "subnet_id": { + "references": [ + "aws_subnet.web_subnet2", + ], + }, + }, + "mode": "managed", + "name": "rtbassoc2", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_route_table_association", + }, + { + "address": "aws_s3_bucket.data", + "expressions": { + "acl": { + "constant_value": "public-read", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "data", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.data_science", + "expressions": { + "acl": { + "constant_value": "private", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "logging": [ + { + "target_bucket": { + "references": [ + "aws_s3_bucket.logs", + ], + }, + "target_prefix": { + "constant_value": "log/", + }, + }, + ], + "versioning": [ + { + "enabled": { + "constant_value": true, + }, + }, + ], + }, + "mode": "managed", + "name": "data_science", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.financials", + "expressions": { + "acl": { + "constant_value": "private", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "financials", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.flowbucket", + "expressions": { + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "flowbucket", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.logs", + "expressions": { + "acl": { + "constant_value": "log-delivery-write", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "kms_master_key_id": { + "references": [ + "aws_kms_key.logs_key", + ], + }, + "sse_algorithm": { + "constant_value": "aws:kms", + }, + }, + ], + }, + ], + }, + ], + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "versioning": [ + { + "enabled": { + "constant_value": true, + }, + }, + ], + }, + "mode": "managed", + "name": "logs", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.operations", + "expressions": { + "acl": { + "constant_value": "private", + }, + "bucket": { + "references": [ + "local.resource_prefix", + ], + }, + "force_destroy": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "versioning": [ + { + "enabled": { + "constant_value": true, + }, + }, + ], + }, + "mode": "managed", + "name": "operations", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket_object.data_object", + "expressions": { + "bucket": { + "references": [ + "aws_s3_bucket.data", + ], + }, + "key": { + "constant_value": "customer-master.xlsx", + }, + "source": { + "constant_value": "resources/customer-master.xlsx", + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "data_object", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_s3_bucket_object", + }, + { + "address": "aws_security_group.default", + "expressions": { + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "mode": "managed", + "name": "default", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_security_group", + }, + { + "address": "aws_security_group.web-node", + "depends_on": [ + "aws_vpc.web_vpc", + ], + "expressions": { + "description": { + "references": [ + "local.resource_prefix", + ], + }, + "name": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "mode": "managed", + "name": "web-node", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_security_group", + }, + { + "address": "aws_security_group_rule.egress", + "expressions": { + "cidr_blocks": { + "constant_value": [ + "0.0.0.0/0", + ], + }, + "from_port": { + "constant_value": 0, + }, + "protocol": { + "constant_value": "-1", + }, + "security_group_id": { + "references": [ + "aws_security_group.default", + ], + }, + "to_port": { + "constant_value": 0, + }, + "type": { + "constant_value": "egress", + }, + }, + "mode": "managed", + "name": "egress", + "provider_config_key": "aws", + "schema_version": 2, + "type": "aws_security_group_rule", + }, + { + "address": "aws_security_group_rule.ingress", + "expressions": { + "cidr_blocks": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + "from_port": { + "constant_value": "3306", + }, + "protocol": { + "constant_value": "tcp", + }, + "security_group_id": { + "references": [ + "aws_security_group.default", + ], + }, + "to_port": { + "constant_value": "3306", + }, + "type": { + "constant_value": "ingress", + }, + }, + "mode": "managed", + "name": "ingress", + "provider_config_key": "aws", + "schema_version": 2, + "type": "aws_security_group_rule", + }, + { + "address": "aws_subnet.eks_subnet1", + "expressions": { + "availability_zone": { + "references": [ + "var.availability_zone", + ], + }, + "cidr_block": { + "constant_value": "10.10.10.0/24", + }, + "map_public_ip_on_launch": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.eks_name", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.eks_vpc", + ], + }, + }, + "mode": "managed", + "name": "eks_subnet1", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_subnet", + }, + { + "address": "aws_subnet.eks_subnet2", + "expressions": { + "availability_zone": { + "references": [ + "var.availability_zone2", + ], + }, + "cidr_block": { + "constant_value": "10.10.11.0/24", + }, + "map_public_ip_on_launch": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + "local.eks_name", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.eks_vpc", + ], + }, + }, + "mode": "managed", + "name": "eks_subnet2", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_subnet", + }, + { + "address": "aws_subnet.web_subnet", + "expressions": { + "availability_zone": { + "references": [ + "var.availability_zone", + ], + }, + "cidr_block": { + "constant_value": "172.16.10.0/24", + }, + "map_public_ip_on_launch": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "mode": "managed", + "name": "web_subnet", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_subnet", + }, + { + "address": "aws_subnet.web_subnet2", + "expressions": { + "availability_zone": { + "references": [ + "var.availability_zone2", + ], + }, + "cidr_block": { + "constant_value": "172.16.11.0/24", + }, + "map_public_ip_on_launch": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + "vpc_id": { + "references": [ + "aws_vpc.web_vpc", + ], + }, + }, + "mode": "managed", + "name": "web_subnet2", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_subnet", + }, + { + "address": "aws_volume_attachment.ebs_att", + "expressions": { + "device_name": { + "constant_value": "/dev/sdh", + }, + "instance_id": { + "references": [ + "aws_instance.web_host", + ], + }, + "volume_id": { + "references": [ + "aws_ebs_volume.web_host_storage", + ], + }, + }, + "mode": "managed", + "name": "ebs_att", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_volume_attachment", + }, + { + "address": "aws_vpc.eks_vpc", + "expressions": { + "cidr_block": { + "constant_value": "10.10.0.0/16", + }, + "enable_dns_hostnames": { + "constant_value": true, + }, + "enable_dns_support": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "eks_vpc", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_vpc", + }, + { + "address": "aws_vpc.web_vpc", + "expressions": { + "cidr_block": { + "constant_value": "172.16.0.0/16", + }, + "enable_dns_hostnames": { + "constant_value": true, + }, + "enable_dns_support": { + "constant_value": true, + }, + "tags": { + "references": [ + "local.resource_prefix", + ], + }, + }, + "mode": "managed", + "name": "web_vpc", + "provider_config_key": "aws", + "schema_version": 1, + "type": "aws_vpc", + }, + { + "address": "null_resource.push_image", + "mode": "managed", + "name": "push_image", + "provider_config_key": "null", + "provisioners": [ + { + "expressions": { + "command": { + "references": [ + "var.region", + "data.aws_caller_identity.current", + "var.region", + "aws_ecr_repository.repository", + "aws_ecr_repository.repository", + "local.docker_image", + "local.docker_image", + ], + }, + "working_dir": { + "references": [ + "path.module", + ], + }, + }, + "type": "local-exec", + }, + ], + "schema_version": 0, + "type": "null_resource", + }, + { + "address": "data.aws_ami.amazon-linux-2", + "expressions": { + "filter": [ + { + "name": { + "constant_value": "owner-alias", + }, + "values": { + "constant_value": [ + "amazon", + ], + }, + }, + { + "name": { + "constant_value": "name", + }, + "values": { + "constant_value": [ + "amzn2-ami-hvm-*-x86_64-ebs", + ], + }, + }, + ], + "most_recent": { + "constant_value": true, + }, + "owners": { + "constant_value": [ + "amazon", + ], + }, + }, + "mode": "data", + "name": "amazon-linux-2", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_ami", + }, + { + "address": "data.aws_caller_identity.current", + "mode": "data", + "name": "current", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_caller_identity", + }, + { + "address": "data.aws_iam_policy_document.iam_policy_eks", + "expressions": { + "statement": [ + { + "actions": { + "constant_value": [ + "sts:AssumeRole", + ], + }, + "effect": { + "constant_value": "Allow", + }, + "principals": [ + { + "identifiers": { + "constant_value": [ + "eks.amazonaws.com", + ], + }, + "type": { + "constant_value": "Service", + }, + }, + ], + }, + ], + }, + "mode": "data", + "name": "iam_policy_eks", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_policy_document", + }, + { + "address": "data.aws_iam_policy_document.policy", + "expressions": { + "statement": [ + { + "actions": { + "constant_value": [ + "es:*", + ], + }, + "principals": [ + { + "identifiers": { + "constant_value": [ + "*", + ], + }, + "type": { + "constant_value": "AWS", + }, + }, + ], + "resources": { + "constant_value": [ + "*", + ], + }, + }, + ], + }, + "mode": "data", + "name": "policy", + "provider_config_key": "aws", + "schema_version": 0, + "type": "aws_iam_policy_document", + }, + ], + "variables": { + "ami": { + "default": "ami-09a5b0b7edf08843d", + }, + "availability_zone": { + "default": "us-west-2a", + }, + "availability_zone2": { + "default": "us-west-2b", + }, + "company_name": { + "default": "acme", + }, + "dbname": { + "default": "db1", + "description": "Name of the Database", + }, + "environment": { + "default": "dev", + }, + "neptune-dbname": { + "default": "neptunedb1", + "description": "Name of the Neptune graph database", + }, + "password": { + "default": "Aa1234321Bb", + "description": "Database password", + }, + "profile": { + "default": "default", + }, + "region": { + "default": "us-west-2", + }, + }, + }, + }, + "format_version": "0.1", + "output_changes": { + "db_app_public_dns": { + "actions": [ + "create", + ], + "after_unknown": true, + "before": null, + }, + "db_endpoint": { + "actions": [ + "create", + ], + "after_unknown": true, + "before": null, + }, + "ec2_public_dns": { + "actions": [ + "create", + ], + "after_unknown": true, + "before": null, + }, + "endpoint": { + "actions": [ + "create", + ], + "after_unknown": true, + "before": null, + }, + "kubeconfig-certificate-authority-data": { + "actions": [ + "create", + ], + "after_unknown": true, + "before": null, + }, + "public_subnet": { + "actions": [ + "create", + ], + "after_unknown": true, + "before": null, + }, + "public_subnet2": { + "actions": [ + "create", + ], + "after_unknown": true, + "before": null, + }, + "secret": { + "actions": [ + "create", + ], + "after_unknown": true, + "before": null, + }, + "username": { + "actions": [ + "create", + ], + "after": "123456789123-acme-dev-user", + "after_unknown": false, + "before": null, + }, + "vpc_id": { + "actions": [ + "create", + ], + "after_unknown": true, + "before": null, + }, + }, + "planned_values": { + "outputs": { + "db_app_public_dns": { + "sensitive": false, + }, + "db_endpoint": { + "sensitive": false, + }, + "ec2_public_dns": { + "sensitive": false, + }, + "endpoint": { + "sensitive": false, + }, + "kubeconfig-certificate-authority-data": { + "sensitive": false, + }, + "public_subnet": { + "sensitive": false, + }, + "public_subnet2": { + "sensitive": false, + }, + "secret": { + "sensitive": false, + }, + "username": { + "sensitive": false, + "value": "123456789123-acme-dev-user", + }, + "vpc_id": { + "sensitive": false, + }, + }, + "root_module": { + "resources": [ + { + "address": "aws_db_instance.default", + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_db_instance", + "values": { + "allocated_storage": 20, + "allow_major_version_upgrade": null, + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "backup_retention_period": 0, + "copy_tags_to_snapshot": false, + "db_subnet_group_name": "sg-123456789123-acme-dev", + "delete_automated_backups": true, + "deletion_protection": null, + "domain": null, + "domain_iam_role_name": null, + "enabled_cloudwatch_logs_exports": null, + "engine": "mysql", + "engine_version": "8.0", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": null, + "identifier": "rds-123456789123-acme-dev", + "instance_class": "db.t3.micro", + "iops": null, + "max_allocated_storage": null, + "monitoring_interval": 0, + "multi_az": false, + "name": "db1", + "option_group_name": "og-123456789123-acme-dev", + "parameter_group_name": "pg-123456789123-acme-dev", + "password": "Aa1234321Bb", + "performance_insights_enabled": false, + "publicly_accessible": true, + "replicate_source_db": null, + "restore_to_point_in_time": [], + "s3_import": [], + "security_group_names": null, + "skip_final_snapshot": true, + "storage_encrypted": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds", + }, + "timeouts": null, + "username": "admin", + }, + }, + { + "address": "aws_db_option_group.default", + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_db_option_group", + "values": { + "engine_name": "mysql", + "major_engine_version": "8.0", + "name": "og-123456789123-acme-dev", + "option": [], + "option_group_description": "Terraform OG", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-og", + }, + "timeouts": null, + }, + }, + { + "address": "aws_db_parameter_group.default", + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_db_parameter_group", + "values": { + "description": "Terraform PG", + "family": "mysql8.0", + "name": "pg-123456789123-acme-dev", + "parameter": [ + { + "apply_method": "immediate", + "name": "character_set_client", + "value": "utf8", + }, + { + "apply_method": "immediate", + "name": "character_set_server", + "value": "utf8", + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-pg", + }, + }, + }, + { + "address": "aws_db_subnet_group.default", + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_db_subnet_group", + "values": { + "description": "Terraform DB Subnet Group", + "name": "sg-123456789123-acme-dev", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "sg-123456789123-acme-dev", + }, + }, + }, + { + "address": "aws_ebs_snapshot.example_snapshot", + "mode": "managed", + "name": "example_snapshot", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_ebs_snapshot", + "values": { + "description": "123456789123-acme-dev-ebs-snapshot", + "tags": { + "Name": "123456789123-acme-dev-ebs-snapshot", + }, + "timeouts": null, + }, + }, + { + "address": "aws_ebs_volume.web_host_storage", + "mode": "managed", + "name": "web_host_storage", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_ebs_volume", + "values": { + "availability_zone": "us-west-2a", + "multi_attach_enabled": null, + "outpost_arn": null, + "size": 1, + "tags": { + "Name": "123456789123-acme-dev-ebs", + }, + }, + }, + { + "address": "aws_ecr_repository.repository", + "mode": "managed", + "name": "repository", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_ecr_repository", + "values": { + "encryption_configuration": [], + "image_scanning_configuration": [], + "image_tag_mutability": "MUTABLE", + "name": "123456789123-acme-dev-repository", + "tags": { + "Name": "123456789123-acme-dev-repository", + }, + "timeouts": null, + }, + }, + { + "address": "aws_eks_cluster.eks_cluster", + "mode": "managed", + "name": "eks_cluster", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_eks_cluster", + "values": { + "enabled_cluster_log_types": null, + "encryption_config": [], + "name": "123456789123-acme-dev-eks", + "tags": null, + "timeouts": null, + "vpc_config": [ + { + "endpoint_private_access": true, + "endpoint_public_access": true, + "security_group_ids": null, + }, + ], + }, + }, + { + "address": "aws_elasticsearch_domain.monitoring-framework", + "mode": "managed", + "name": "monitoring-framework", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_elasticsearch_domain", + "values": { + "cluster_config": [ + { + "dedicated_master_count": null, + "dedicated_master_enabled": false, + "dedicated_master_type": null, + "instance_count": 1, + "instance_type": "t2.small.elasticsearch", + "warm_count": null, + "warm_enabled": null, + "warm_type": null, + "zone_awareness_config": [], + "zone_awareness_enabled": null, + }, + ], + "cognito_options": [], + "domain_name": "tg-dev-es", + "ebs_options": [ + { + "ebs_enabled": true, + "iops": null, + "volume_size": 30, + }, + ], + "elasticsearch_version": "2.3", + "log_publishing_options": [], + "snapshot_options": [], + "tags": null, + "timeouts": null, + "vpc_options": [], + }, + }, + { + "address": "aws_elasticsearch_domain_policy.monitoring-framework-policy", + "mode": "managed", + "name": "monitoring-framework-policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_elasticsearch_domain_policy", + "values": { + "access_policies": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "domain_name": "tg-dev-es", + }, + }, + { + "address": "aws_elb.weblb", + "mode": "managed", + "name": "weblb", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_elb", + "values": { + "access_logs": [], + "connection_draining": true, + "connection_draining_timeout": 400, + "cross_zone_load_balancing": true, + "health_check": [ + { + "healthy_threshold": 2, + "interval": 30, + "target": "HTTP:8000/", + "timeout": 3, + "unhealthy_threshold": 2, + }, + ], + "idle_timeout": 400, + "listener": [ + { + "instance_port": 8000, + "instance_protocol": "http", + "lb_port": 80, + "lb_protocol": "http", + "ssl_certificate_id": "", + }, + ], + "name": "weblb-terraform-elb", + "name_prefix": null, + "tags": { + "Name": "foobar-terraform-elb", + }, + }, + }, + { + "address": "aws_flow_log.vpcflowlogs", + "mode": "managed", + "name": "vpcflowlogs", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_flow_log", + "values": { + "eni_id": null, + "iam_role_arn": null, + "log_destination_type": "s3", + "max_aggregation_interval": 600, + "subnet_id": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "traffic_type": "ALL", + }, + }, + { + "address": "aws_iam_access_key.user", + "mode": "managed", + "name": "user", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_access_key", + "values": { + "pgp_key": null, + "user": "123456789123-acme-dev-user", + }, + }, + { + "address": "aws_iam_instance_profile.ec2profile", + "mode": "managed", + "name": "ec2profile", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_instance_profile", + "values": { + "name": "123456789123-acme-dev-profile", + "name_prefix": null, + "path": "/", + "role": "123456789123-acme-dev-role", + "tags": null, + }, + }, + { + "address": "aws_iam_role.ec2role", + "mode": "managed", + "name": "ec2role", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_role", + "values": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-role", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-role", + }, + }, + }, + { + "address": "aws_iam_role.iam_for_eks", + "mode": "managed", + "name": "iam_for_eks", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_role", + "values": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-iam-for-eks", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + }, + { + "address": "aws_iam_role.iam_for_lambda", + "mode": "managed", + "name": "iam_for_lambda", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_role", + "values": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-analysis-lambda", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + }, + { + "address": "aws_iam_role_policy.ec2policy", + "mode": "managed", + "name": "ec2policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_role_policy", + "values": { + "name": "123456789123-acme-dev-policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + }, + { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy", + "mode": "managed", + "name": "policy_attachment-AmazonEKSClusterPolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_role_policy_attachment", + "values": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + }, + { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy", + "mode": "managed", + "name": "policy_attachment-AmazonEKSServicePolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_role_policy_attachment", + "values": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + }, + { + "address": "aws_iam_user.user", + "mode": "managed", + "name": "user", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_user", + "values": { + "force_destroy": true, + "name": "123456789123-acme-dev-user", + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-user", + }, + }, + }, + { + "address": "aws_iam_user_policy.userpolicy", + "mode": "managed", + "name": "userpolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_user_policy", + "values": { + "name": "excess_policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + "user": "123456789123-acme-dev-user", + }, + }, + { + "address": "aws_instance.db_app", + "mode": "managed", + "name": "db_app", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_instance", + "values": { + "ami": "ami-06d584c1805ad64fb", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": "123456789123-acme-dev-profile", + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-dbapp", + }, + "timeouts": null, + "user_data_base64": null, + "volume_tags": null, + }, + }, + { + "address": "aws_instance.web_host", + "mode": "managed", + "name": "web_host", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_instance", + "values": { + "ami": "ami-09a5b0b7edf08843d", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": null, + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-ec2", + }, + "timeouts": null, + "user_data": "44c6c808e6449ee36dfcfc4ebd66c1b9634b40f2", + "user_data_base64": null, + "volume_tags": null, + }, + }, + { + "address": "aws_internet_gateway.web_igw", + "mode": "managed", + "name": "web_igw", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_internet_gateway", + "values": { + "tags": { + "Name": "123456789123-acme-dev-igw", + }, + }, + }, + { + "address": "aws_kms_alias.logs_key_alias", + "mode": "managed", + "name": "logs_key_alias", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_kms_alias", + "values": { + "name": "alias/123456789123-acme-dev-logs-bucket-key", + "name_prefix": null, + }, + }, + { + "address": "aws_kms_key.logs_key", + "mode": "managed", + "name": "logs_key", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_kms_key", + "values": { + "customer_master_key_spec": "SYMMETRIC_DEFAULT", + "deletion_window_in_days": 7, + "description": "123456789123-acme-dev-logs bucket key", + "enable_key_rotation": false, + "is_enabled": true, + "key_usage": "ENCRYPT_DECRYPT", + "tags": null, + }, + }, + { + "address": "aws_lambda_function.analysis_lambda", + "mode": "managed", + "name": "analysis_lambda", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_lambda_function", + "values": { + "code_signing_config_arn": null, + "dead_letter_config": [], + "description": null, + "environment": [ + { + "variables": { + "access_key": "{{REDACTED}}", + "secret_key": "{{REDACTED}}", + }, + }, + ], + "file_system_config": [], + "filename": "resources/lambda_function_payload.zip", + "function_name": "123456789123-acme-dev-analysis", + "handler": "exports.test", + "image_config": [], + "image_uri": null, + "kms_key_arn": null, + "layers": null, + "memory_size": 128, + "package_type": "Zip", + "publish": false, + "reserved_concurrent_executions": -1, + "runtime": "nodejs12.x", + "s3_bucket": null, + "s3_key": null, + "s3_object_version": null, + "source_code_hash": "Fne61Y/F2pmVywaVqIYcztFMK3LNeMJKpWFNnxDdGTw=", + "tags": null, + "timeout": 3, + "timeouts": null, + "vpc_config": [], + }, + }, + { + "address": "aws_neptune_cluster.default", + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_neptune_cluster", + "values": { + "apply_immediately": true, + "backup_retention_period": 5, + "cluster_identifier": "neptunedb1", + "deletion_protection": null, + "enable_cloudwatch_logs_exports": null, + "engine": "neptune", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": false, + "iam_roles": null, + "neptune_cluster_parameter_group_name": "default.neptune1", + "port": 8182, + "preferred_backup_window": "07:00-09:00", + "replication_source_identifier": null, + "skip_final_snapshot": true, + "snapshot_identifier": null, + "storage_encrypted": false, + "tags": null, + "timeouts": null, + }, + }, + { + "address": "aws_neptune_cluster_instance.default[0]", + "index": 0, + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_neptune_cluster_instance", + "values": { + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "engine": "neptune", + "instance_class": "db.t3.medium", + "neptune_parameter_group_name": "default.neptune1", + "port": 8182, + "promotion_tier": 0, + "publicly_accessible": false, + "tags": null, + "timeouts": null, + }, + }, + { + "address": "aws_neptune_cluster_snapshot.default", + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_neptune_cluster_snapshot", + "values": { + "db_cluster_snapshot_identifier": "resourcetestsnapshot1", + "timeouts": null, + }, + }, + { + "address": "aws_network_interface.web-eni", + "mode": "managed", + "name": "web-eni", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_network_interface", + "values": { + "description": null, + "private_ips": [ + "172.16.10.100", + ], + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-primary_network_interface", + }, + }, + }, + { + "address": "aws_route.public_internet_gateway", + "mode": "managed", + "name": "public_internet_gateway", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_route", + "values": { + "carrier_gateway_id": null, + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": null, + "destination_prefix_list_id": null, + "egress_only_gateway_id": null, + "local_gateway_id": null, + "nat_gateway_id": null, + "timeouts": { + "create": "5m", + "delete": null, + }, + "transit_gateway_id": null, + "vpc_endpoint_id": null, + "vpc_peering_connection_id": null, + }, + }, + { + "address": "aws_route_table.web_rtb", + "mode": "managed", + "name": "web_rtb", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_route_table", + "values": { + "tags": { + "Name": "123456789123-acme-dev-rtb", + }, + }, + }, + { + "address": "aws_route_table_association.rtbassoc", + "mode": "managed", + "name": "rtbassoc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_route_table_association", + "values": { + "gateway_id": null, + }, + }, + { + "address": "aws_route_table_association.rtbassoc2", + "mode": "managed", + "name": "rtbassoc2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_route_table_association", + "values": { + "gateway_id": null, + }, + }, + { + "address": "aws_s3_bucket.data", + "mode": "managed", + "name": "data", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_s3_bucket", + "values": { + "acl": "public-read", + "bucket": "123456789123-acme-dev-data", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-data", + }, + "website": [], + }, + }, + { + "address": "aws_s3_bucket.data_science", + "mode": "managed", + "name": "data_science", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_s3_bucket", + "values": { + "acl": "private", + "bucket": "123456789123-acme-dev-data-science", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [ + { + "target_prefix": "log/", + }, + ], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": null, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + }, + { + "address": "aws_s3_bucket.financials", + "mode": "managed", + "name": "financials", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_s3_bucket", + "values": { + "acl": "private", + "bucket": "123456789123-acme-dev-financials", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-financials", + }, + "website": [], + }, + }, + { + "address": "aws_s3_bucket.flowbucket", + "mode": "managed", + "name": "flowbucket", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_s3_bucket", + "values": { + "acl": "private", + "bucket": "123456789123-acme-dev-flowlogs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "website": [], + }, + }, + { + "address": "aws_s3_bucket.logs", + "mode": "managed", + "name": "logs", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_s3_bucket", + "values": { + "acl": "log-delivery-write", + "bucket": "123456789123-acme-dev-logs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "sse_algorithm": "aws:kms", + }, + ], + "bucket_key_enabled": null, + }, + ], + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-logs", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + }, + { + "address": "aws_s3_bucket.operations", + "mode": "managed", + "name": "operations", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_s3_bucket", + "values": { + "acl": "private", + "bucket": "123456789123-acme-dev-operations", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-operations", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + }, + { + "address": "aws_s3_bucket_object.data_object", + "mode": "managed", + "name": "data_object", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_s3_bucket_object", + "values": { + "acl": "private", + "cache_control": null, + "content": null, + "content_base64": null, + "content_disposition": null, + "content_encoding": null, + "content_language": null, + "force_destroy": false, + "key": "customer-master.xlsx", + "metadata": null, + "object_lock_legal_hold_status": null, + "object_lock_mode": null, + "object_lock_retain_until_date": null, + "source": "resources/customer-master.xlsx", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-customer-master", + }, + "website_redirect": null, + }, + }, + { + "address": "aws_security_group.default", + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_security_group", + "values": { + "description": "Managed by Terraform", + "name": "123456789123-acme-dev-rds-sg", + "revoke_rules_on_delete": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds-sg", + }, + "timeouts": null, + }, + }, + { + "address": "aws_security_group.web-node", + "mode": "managed", + "name": "web-node", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_security_group", + "values": { + "description": "123456789123-acme-dev Security Group", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0, + }, + ], + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 22, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 22, + }, + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 80, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 80, + }, + ], + "name": "123456789123-acme-dev-sg", + "revoke_rules_on_delete": false, + "tags": null, + "timeouts": null, + }, + }, + { + "address": "aws_security_group_rule.egress", + "mode": "managed", + "name": "egress", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 2, + "type": "aws_security_group_rule", + "values": { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": null, + "from_port": 0, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "-1", + "self": false, + "to_port": 0, + "type": "egress", + }, + }, + { + "address": "aws_security_group_rule.ingress", + "mode": "managed", + "name": "ingress", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 2, + "type": "aws_security_group_rule", + "values": { + "cidr_blocks": [ + "172.16.0.0/16", + ], + "description": null, + "from_port": 3306, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "tcp", + "self": false, + "to_port": 3306, + "type": "ingress", + }, + }, + { + "address": "aws_subnet.eks_subnet1", + "mode": "managed", + "name": "eks_subnet1", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_subnet", + "values": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "10.10.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + }, + { + "address": "aws_subnet.eks_subnet2", + "mode": "managed", + "name": "eks_subnet2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_subnet", + "values": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "10.10.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + }, + { + "address": "aws_subnet.web_subnet", + "mode": "managed", + "name": "web_subnet", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_subnet", + "values": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "172.16.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet", + }, + "timeouts": null, + }, + }, + { + "address": "aws_subnet.web_subnet2", + "mode": "managed", + "name": "web_subnet2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_subnet", + "values": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "172.16.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet2", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet2", + }, + "timeouts": null, + }, + }, + { + "address": "aws_volume_attachment.ebs_att", + "mode": "managed", + "name": "ebs_att", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_volume_attachment", + "values": { + "device_name": "/dev/sdh", + "force_detach": null, + "skip_destroy": null, + }, + }, + { + "address": "aws_vpc.eks_vpc", + "mode": "managed", + "name": "eks_vpc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_vpc", + "values": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.10.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + }, + }, + { + "address": "aws_vpc.web_vpc", + "mode": "managed", + "name": "web_vpc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 1, + "type": "aws_vpc", + "values": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "172.16.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-vpc", + }, + }, + }, + { + "address": "null_resource.push_image", + "mode": "managed", + "name": "push_image", + "provider_name": "registry.terraform.io/hashicorp/null", + "schema_version": 0, + "type": "null_resource", + "values": { + "triggers": null, + }, + }, + ], + }, + }, + "prior_state": { + "format_version": "0.1", + "terraform_version": "0.14.7", + "values": { + "outputs": { + "username": { + "sensitive": false, + "value": "123456789123-acme-dev-user", + }, + }, + "root_module": { + "resources": [ + { + "address": "data.aws_ami.amazon-linux-2", + "mode": "data", + "name": "amazon-linux-2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_ami", + "values": { + "architecture": "x86_64", + "arn": "arn:aws:ec2:us-west-1::image/ami-06d584c1805ad64fb", + "block_device_mappings": [ + { + "device_name": "/dev/xvda", + "ebs": { + "delete_on_termination": "true", + "encrypted": "false", + "iops": "0", + "snapshot_id": "snap-0fbf7b35b6f00249f", + "throughput": "0", + "volume_size": "8", + "volume_type": "standard", + }, + "no_device": "", + "virtual_name": "", + }, + ], + "creation_date": "2021-03-26T23:02:09.000Z", + "description": "Amazon Linux 2 AMI 2.0.20210326.0 x86_64 HVM ebs", + "ena_support": true, + "executable_users": null, + "filter": [ + { + "name": "name", + "values": [ + "amzn2-ami-hvm-*-x86_64-ebs", + ], + }, + { + "name": "owner-alias", + "values": [ + "amazon", + ], + }, + ], + "hypervisor": "xen", + "id": "ami-06d584c1805ad64fb", + "image_id": "ami-06d584c1805ad64fb", + "image_location": "amazon/amzn2-ami-hvm-2.0.20210326.0-x86_64-ebs", + "image_owner_alias": "amazon", + "image_type": "machine", + "kernel_id": null, + "most_recent": true, + "name": "amzn2-ami-hvm-2.0.20210326.0-x86_64-ebs", + "name_regex": null, + "owner_id": "137112412989", + "owners": [ + "amazon", + ], + "platform": null, + "platform_details": "Linux/UNIX", + "product_codes": [], + "public": true, + "ramdisk_id": null, + "root_device_name": "/dev/xvda", + "root_device_type": "ebs", + "root_snapshot_id": "snap-0fbf7b35b6f00249f", + "sriov_net_support": "simple", + "state": "available", + "state_reason": { + "code": "UNSET", + "message": "UNSET", + }, + "tags": {}, + "usage_operation": "RunInstances", + "virtualization_type": "hvm", + }, + }, + { + "address": "data.aws_caller_identity.current", + "mode": "data", + "name": "current", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_caller_identity", + "values": { + "account_id": "123456789123", + "arn": "arn:aws:iam::123456789123:user/terraform-test", + "id": "123456789123", + "user_id": "AIDAT7X67JOMQS4DRTZRE", + }, + }, + { + "address": "data.aws_iam_policy_document.iam_policy_eks", + "mode": "data", + "name": "iam_policy_eks", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_policy_document", + "values": { + "id": "189502314", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "sts:AssumeRole", + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "eks.amazonaws.com", + ], + "type": "Service", + }, + ], + "resources": [], + "sid": "", + }, + ], + "version": "2012-10-17", + }, + }, + { + "address": "data.aws_iam_policy_document.policy", + "mode": "data", + "name": "policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "schema_version": 0, + "type": "aws_iam_policy_document", + "values": { + "id": "3931805674", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "es:*", + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "*", + ], + "type": "AWS", + }, + ], + "resources": [ + "*", + ], + "sid": "", + }, + ], + "version": "2012-10-17", + }, + }, + ], + }, + }, + }, + "resource_changes": [ + { + "address": "aws_db_instance.default", + "change": { + "actions": [ + "create", + ], + "after": { + "allocated_storage": 20, + "allow_major_version_upgrade": null, + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "backup_retention_period": 0, + "copy_tags_to_snapshot": false, + "db_subnet_group_name": "sg-123456789123-acme-dev", + "delete_automated_backups": true, + "deletion_protection": null, + "domain": null, + "domain_iam_role_name": null, + "enabled_cloudwatch_logs_exports": null, + "engine": "mysql", + "engine_version": "8.0", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": null, + "identifier": "rds-123456789123-acme-dev", + "instance_class": "db.t3.micro", + "iops": null, + "max_allocated_storage": null, + "monitoring_interval": 0, + "multi_az": false, + "name": "db1", + "option_group_name": "og-123456789123-acme-dev", + "parameter_group_name": "pg-123456789123-acme-dev", + "password": "Aa1234321Bb", + "performance_insights_enabled": false, + "publicly_accessible": true, + "replicate_source_db": null, + "restore_to_point_in_time": [], + "s3_import": [], + "security_group_names": null, + "skip_final_snapshot": true, + "storage_encrypted": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds", + }, + "timeouts": null, + "username": "admin", + }, + "after_unknown": { + "address": true, + "arn": true, + "availability_zone": true, + "backup_window": true, + "ca_cert_identifier": true, + "character_set_name": true, + "endpoint": true, + "hosted_zone_id": true, + "id": true, + "identifier_prefix": true, + "kms_key_id": true, + "latest_restorable_time": true, + "license_model": true, + "maintenance_window": true, + "monitoring_role_arn": true, + "performance_insights_kms_key_id": true, + "performance_insights_retention_period": true, + "port": true, + "replicas": true, + "resource_id": true, + "restore_to_point_in_time": [], + "s3_import": [], + "snapshot_identifier": true, + "status": true, + "storage_type": true, + "tags": {}, + "timezone": true, + "vpc_security_group_ids": true, + }, + "before": null, + }, + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_db_instance", + }, + { + "address": "aws_db_option_group.default", + "change": { + "actions": [ + "create", + ], + "after": { + "engine_name": "mysql", + "major_engine_version": "8.0", + "name": "og-123456789123-acme-dev", + "option": [], + "option_group_description": "Terraform OG", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-og", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "id": true, + "name_prefix": true, + "option": [], + "tags": {}, + }, + "before": null, + }, + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_db_option_group", + }, + { + "address": "aws_db_parameter_group.default", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "Terraform PG", + "family": "mysql8.0", + "name": "pg-123456789123-acme-dev", + "parameter": [ + { + "apply_method": "immediate", + "name": "character_set_client", + "value": "utf8", + }, + { + "apply_method": "immediate", + "name": "character_set_server", + "value": "utf8", + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-pg", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "name_prefix": true, + "parameter": [ + {}, + {}, + ], + "tags": {}, + }, + "before": null, + }, + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_db_parameter_group", + }, + { + "address": "aws_db_subnet_group.default", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "Terraform DB Subnet Group", + "name": "sg-123456789123-acme-dev", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "sg-123456789123-acme-dev", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "name_prefix": true, + "subnet_ids": true, + "tags": {}, + }, + "before": null, + }, + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_db_subnet_group", + }, + { + "address": "aws_ebs_snapshot.example_snapshot", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "123456789123-acme-dev-ebs-snapshot", + "tags": { + "Name": "123456789123-acme-dev-ebs-snapshot", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "data_encryption_key_id": true, + "encrypted": true, + "id": true, + "kms_key_id": true, + "owner_alias": true, + "owner_id": true, + "tags": {}, + "volume_id": true, + "volume_size": true, + }, + "before": null, + }, + "mode": "managed", + "name": "example_snapshot", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_ebs_snapshot", + }, + { + "address": "aws_ebs_volume.web_host_storage", + "change": { + "actions": [ + "create", + ], + "after": { + "availability_zone": "us-west-2a", + "multi_attach_enabled": null, + "outpost_arn": null, + "size": 1, + "tags": { + "Name": "123456789123-acme-dev-ebs", + }, + }, + "after_unknown": { + "arn": true, + "encrypted": true, + "id": true, + "iops": true, + "kms_key_id": true, + "snapshot_id": true, + "tags": {}, + "throughput": true, + "type": true, + }, + "before": null, + }, + "mode": "managed", + "name": "web_host_storage", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_ebs_volume", + }, + { + "address": "aws_ecr_repository.repository", + "change": { + "actions": [ + "create", + ], + "after": { + "encryption_configuration": [], + "image_scanning_configuration": [], + "image_tag_mutability": "MUTABLE", + "name": "123456789123-acme-dev-repository", + "tags": { + "Name": "123456789123-acme-dev-repository", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "encryption_configuration": [], + "id": true, + "image_scanning_configuration": [], + "registry_id": true, + "repository_url": true, + "tags": {}, + }, + "before": null, + }, + "mode": "managed", + "name": "repository", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_ecr_repository", + }, + { + "address": "aws_eks_cluster.eks_cluster", + "change": { + "actions": [ + "create", + ], + "after": { + "enabled_cluster_log_types": null, + "encryption_config": [], + "name": "123456789123-acme-dev-eks", + "tags": null, + "timeouts": null, + "vpc_config": [ + { + "endpoint_private_access": true, + "endpoint_public_access": true, + "security_group_ids": null, + }, + ], + }, + "after_unknown": { + "arn": true, + "certificate_authority": true, + "created_at": true, + "encryption_config": [], + "endpoint": true, + "id": true, + "identity": true, + "kubernetes_network_config": true, + "platform_version": true, + "role_arn": true, + "status": true, + "version": true, + "vpc_config": [ + { + "cluster_security_group_id": true, + "public_access_cidrs": true, + "subnet_ids": true, + "vpc_id": true, + }, + ], + }, + "before": null, + }, + "mode": "managed", + "name": "eks_cluster", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_eks_cluster", + }, + { + "address": "aws_elasticsearch_domain.monitoring-framework", + "change": { + "actions": [ + "create", + ], + "after": { + "cluster_config": [ + { + "dedicated_master_count": null, + "dedicated_master_enabled": false, + "dedicated_master_type": null, + "instance_count": 1, + "instance_type": "t2.small.elasticsearch", + "warm_count": null, + "warm_enabled": null, + "warm_type": null, + "zone_awareness_config": [], + "zone_awareness_enabled": null, + }, + ], + "cognito_options": [], + "domain_name": "tg-dev-es", + "ebs_options": [ + { + "ebs_enabled": true, + "iops": null, + "volume_size": 30, + }, + ], + "elasticsearch_version": "2.3", + "log_publishing_options": [], + "snapshot_options": [], + "tags": null, + "timeouts": null, + "vpc_options": [], + }, + "after_unknown": { + "access_policies": true, + "advanced_options": true, + "advanced_security_options": true, + "arn": true, + "cluster_config": [ + { + "zone_awareness_config": [], + }, + ], + "cognito_options": [], + "domain_endpoint_options": true, + "domain_id": true, + "ebs_options": [ + { + "volume_type": true, + }, + ], + "encrypt_at_rest": true, + "endpoint": true, + "id": true, + "kibana_endpoint": true, + "log_publishing_options": [], + "node_to_node_encryption": true, + "snapshot_options": [], + "vpc_options": [], + }, + "before": null, + }, + "mode": "managed", + "name": "monitoring-framework", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_elasticsearch_domain", + }, + { + "address": "aws_elasticsearch_domain_policy.monitoring-framework-policy", + "change": { + "actions": [ + "create", + ], + "after": { + "access_policies": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "domain_name": "tg-dev-es", + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "monitoring-framework-policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_elasticsearch_domain_policy", + }, + { + "address": "aws_elb.weblb", + "change": { + "actions": [ + "create", + ], + "after": { + "access_logs": [], + "connection_draining": true, + "connection_draining_timeout": 400, + "cross_zone_load_balancing": true, + "health_check": [ + { + "healthy_threshold": 2, + "interval": 30, + "target": "HTTP:8000/", + "timeout": 3, + "unhealthy_threshold": 2, + }, + ], + "idle_timeout": 400, + "listener": [ + { + "instance_port": 8000, + "instance_protocol": "http", + "lb_port": 80, + "lb_protocol": "http", + "ssl_certificate_id": "", + }, + ], + "name": "weblb-terraform-elb", + "name_prefix": null, + "tags": { + "Name": "foobar-terraform-elb", + }, + }, + "after_unknown": { + "access_logs": [], + "arn": true, + "availability_zones": true, + "dns_name": true, + "health_check": [ + {}, + ], + "id": true, + "instances": true, + "internal": true, + "listener": [ + {}, + ], + "security_groups": true, + "source_security_group": true, + "source_security_group_id": true, + "subnets": true, + "tags": {}, + "zone_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "weblb", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_elb", + }, + { + "address": "aws_flow_log.vpcflowlogs", + "change": { + "actions": [ + "create", + ], + "after": { + "eni_id": null, + "iam_role_arn": null, + "log_destination_type": "s3", + "max_aggregation_interval": 600, + "subnet_id": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "traffic_type": "ALL", + }, + "after_unknown": { + "arn": true, + "id": true, + "log_destination": true, + "log_format": true, + "log_group_name": true, + "tags": {}, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "vpcflowlogs", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_flow_log", + }, + { + "address": "aws_iam_access_key.user", + "change": { + "actions": [ + "create", + ], + "after": { + "pgp_key": null, + "user": "123456789123-acme-dev-user", + }, + "after_unknown": { + "create_date": true, + "encrypted_secret": true, + "id": true, + "key_fingerprint": true, + "secret": true, + "ses_smtp_password_v4": true, + "status": true, + }, + "before": null, + }, + "mode": "managed", + "name": "user", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_access_key", + }, + { + "address": "aws_iam_instance_profile.ec2profile", + "change": { + "actions": [ + "create", + ], + "after": { + "name": "123456789123-acme-dev-profile", + "name_prefix": null, + "path": "/", + "role": "123456789123-acme-dev-role", + "tags": null, + }, + "after_unknown": { + "arn": true, + "create_date": true, + "id": true, + "unique_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "ec2profile", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_instance_profile", + }, + { + "address": "aws_iam_role.ec2role", + "change": { + "actions": [ + "create", + ], + "after": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-role", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-role", + }, + }, + "after_unknown": { + "arn": true, + "create_date": true, + "id": true, + "inline_policy": true, + "managed_policy_arns": true, + "tags": {}, + "unique_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "ec2role", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role", + }, + { + "address": "aws_iam_role.iam_for_eks", + "change": { + "actions": [ + "create", + ], + "after": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-iam-for-eks", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + "after_unknown": { + "arn": true, + "create_date": true, + "id": true, + "inline_policy": true, + "managed_policy_arns": true, + "unique_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "iam_for_eks", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role", + }, + { + "address": "aws_iam_role.iam_for_lambda", + "change": { + "actions": [ + "create", + ], + "after": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-analysis-lambda", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + "after_unknown": { + "arn": true, + "create_date": true, + "id": true, + "inline_policy": true, + "managed_policy_arns": true, + "unique_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "iam_for_lambda", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role", + }, + { + "address": "aws_iam_role_policy.ec2policy", + "change": { + "actions": [ + "create", + ], + "after": { + "name": "123456789123-acme-dev-policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + "after_unknown": { + "id": true, + "role": true, + }, + "before": null, + }, + "mode": "managed", + "name": "ec2policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role_policy", + }, + { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSClusterPolicy", + "change": { + "actions": [ + "create", + ], + "after": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "policy_attachment-AmazonEKSClusterPolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role_policy_attachment", + }, + { + "address": "aws_iam_role_policy_attachment.policy_attachment-AmazonEKSServicePolicy", + "change": { + "actions": [ + "create", + ], + "after": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "policy_attachment-AmazonEKSServicePolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_role_policy_attachment", + }, + { + "address": "aws_iam_user.user", + "change": { + "actions": [ + "create", + ], + "after": { + "force_destroy": true, + "name": "123456789123-acme-dev-user", + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-user", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "tags": {}, + "unique_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "user", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_user", + }, + { + "address": "aws_iam_user_policy.userpolicy", + "change": { + "actions": [ + "create", + ], + "after": { + "name": "excess_policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + "user": "123456789123-acme-dev-user", + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "userpolicy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_iam_user_policy", + }, + { + "address": "aws_instance.db_app", + "change": { + "actions": [ + "create", + ], + "after": { + "ami": "ami-06d584c1805ad64fb", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": "123456789123-acme-dev-profile", + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-dbapp", + }, + "timeouts": null, + "user_data_base64": null, + "volume_tags": null, + }, + "after_unknown": { + "arn": true, + "associate_public_ip_address": true, + "availability_zone": true, + "cpu_core_count": true, + "cpu_threads_per_core": true, + "credit_specification": [], + "ebs_block_device": true, + "enclave_options": true, + "ephemeral_block_device": true, + "host_id": true, + "id": true, + "instance_state": true, + "ipv6_address_count": true, + "ipv6_addresses": true, + "key_name": true, + "metadata_options": true, + "network_interface": true, + "outpost_arn": true, + "password_data": true, + "placement_group": true, + "primary_network_interface_id": true, + "private_dns": true, + "private_ip": true, + "public_dns": true, + "public_ip": true, + "root_block_device": true, + "secondary_private_ips": true, + "security_groups": true, + "subnet_id": true, + "tags": {}, + "tenancy": true, + "user_data": true, + "vpc_security_group_ids": true, + }, + "before": null, + }, + "mode": "managed", + "name": "db_app", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_instance", + }, + { + "address": "aws_instance.web_host", + "change": { + "actions": [ + "create", + ], + "after": { + "ami": "ami-09a5b0b7edf08843d", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": null, + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-ec2", + }, + "timeouts": null, + "user_data": "44c6c808e6449ee36dfcfc4ebd66c1b9634b40f2", + "user_data_base64": null, + "volume_tags": null, + }, + "after_unknown": { + "arn": true, + "associate_public_ip_address": true, + "availability_zone": true, + "cpu_core_count": true, + "cpu_threads_per_core": true, + "credit_specification": [], + "ebs_block_device": true, + "enclave_options": true, + "ephemeral_block_device": true, + "host_id": true, + "id": true, + "instance_state": true, + "ipv6_address_count": true, + "ipv6_addresses": true, + "key_name": true, + "metadata_options": true, + "network_interface": true, + "outpost_arn": true, + "password_data": true, + "placement_group": true, + "primary_network_interface_id": true, + "private_dns": true, + "private_ip": true, + "public_dns": true, + "public_ip": true, + "root_block_device": true, + "secondary_private_ips": true, + "security_groups": true, + "subnet_id": true, + "tags": {}, + "tenancy": true, + "vpc_security_group_ids": true, + }, + "before": null, + }, + "mode": "managed", + "name": "web_host", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_instance", + }, + { + "address": "aws_internet_gateway.web_igw", + "change": { + "actions": [ + "create", + ], + "after": { + "tags": { + "Name": "123456789123-acme-dev-igw", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "owner_id": true, + "tags": {}, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "web_igw", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_internet_gateway", + }, + { + "address": "aws_kms_alias.logs_key_alias", + "change": { + "actions": [ + "create", + ], + "after": { + "name": "alias/123456789123-acme-dev-logs-bucket-key", + "name_prefix": null, + }, + "after_unknown": { + "arn": true, + "id": true, + "target_key_arn": true, + "target_key_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "logs_key_alias", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_kms_alias", + }, + { + "address": "aws_kms_key.logs_key", + "change": { + "actions": [ + "create", + ], + "after": { + "customer_master_key_spec": "SYMMETRIC_DEFAULT", + "deletion_window_in_days": 7, + "description": "123456789123-acme-dev-logs bucket key", + "enable_key_rotation": false, + "is_enabled": true, + "key_usage": "ENCRYPT_DECRYPT", + "tags": null, + }, + "after_unknown": { + "arn": true, + "id": true, + "key_id": true, + "policy": true, + }, + "before": null, + }, + "mode": "managed", + "name": "logs_key", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_kms_key", + }, + { + "address": "aws_lambda_function.analysis_lambda", + "change": { + "actions": [ + "create", + ], + "after": { + "code_signing_config_arn": null, + "dead_letter_config": [], + "description": null, + "environment": [ + { + "variables": { + "access_key": "{{REDACTED}}", + "secret_key": "{{REDACTED}}", + }, + }, + ], + "file_system_config": [], + "filename": "resources/lambda_function_payload.zip", + "function_name": "123456789123-acme-dev-analysis", + "handler": "exports.test", + "image_config": [], + "image_uri": null, + "kms_key_arn": null, + "layers": null, + "memory_size": 128, + "package_type": "Zip", + "publish": false, + "reserved_concurrent_executions": -1, + "runtime": "nodejs12.x", + "s3_bucket": null, + "s3_key": null, + "s3_object_version": null, + "source_code_hash": "Fne61Y/F2pmVywaVqIYcztFMK3LNeMJKpWFNnxDdGTw=", + "tags": null, + "timeout": 3, + "timeouts": null, + "vpc_config": [], + }, + "after_unknown": { + "arn": true, + "dead_letter_config": [], + "environment": [ + { + "variables": {}, + }, + ], + "file_system_config": [], + "id": true, + "image_config": [], + "invoke_arn": true, + "last_modified": true, + "qualified_arn": true, + "role": true, + "signing_job_arn": true, + "signing_profile_version_arn": true, + "source_code_size": true, + "tracing_config": true, + "version": true, + "vpc_config": [], + }, + "before": null, + }, + "mode": "managed", + "name": "analysis_lambda", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_lambda_function", + }, + { + "address": "aws_neptune_cluster.default", + "change": { + "actions": [ + "create", + ], + "after": { + "apply_immediately": true, + "backup_retention_period": 5, + "cluster_identifier": "neptunedb1", + "deletion_protection": null, + "enable_cloudwatch_logs_exports": null, + "engine": "neptune", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": false, + "iam_roles": null, + "neptune_cluster_parameter_group_name": "default.neptune1", + "port": 8182, + "preferred_backup_window": "07:00-09:00", + "replication_source_identifier": null, + "skip_final_snapshot": true, + "snapshot_identifier": null, + "storage_encrypted": false, + "tags": null, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zones": true, + "cluster_identifier_prefix": true, + "cluster_members": true, + "cluster_resource_id": true, + "endpoint": true, + "engine_version": true, + "hosted_zone_id": true, + "id": true, + "kms_key_arn": true, + "neptune_subnet_group_name": true, + "preferred_maintenance_window": true, + "reader_endpoint": true, + "vpc_security_group_ids": true, + }, + "before": null, + }, + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_neptune_cluster", + }, + { + "address": "aws_neptune_cluster_instance.default[0]", + "change": { + "actions": [ + "create", + ], + "after": { + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "engine": "neptune", + "instance_class": "db.t3.medium", + "neptune_parameter_group_name": "default.neptune1", + "port": 8182, + "promotion_tier": 0, + "publicly_accessible": false, + "tags": null, + "timeouts": null, + }, + "after_unknown": { + "address": true, + "arn": true, + "availability_zone": true, + "cluster_identifier": true, + "dbi_resource_id": true, + "endpoint": true, + "engine_version": true, + "id": true, + "identifier": true, + "identifier_prefix": true, + "kms_key_arn": true, + "neptune_subnet_group_name": true, + "preferred_backup_window": true, + "preferred_maintenance_window": true, + "storage_encrypted": true, + "writer": true, + }, + "before": null, + }, + "index": 0, + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_neptune_cluster_instance", + }, + { + "address": "aws_neptune_cluster_snapshot.default", + "change": { + "actions": [ + "create", + ], + "after": { + "db_cluster_snapshot_identifier": "resourcetestsnapshot1", + "timeouts": null, + }, + "after_unknown": { + "allocated_storage": true, + "availability_zones": true, + "db_cluster_identifier": true, + "db_cluster_snapshot_arn": true, + "engine": true, + "engine_version": true, + "id": true, + "kms_key_id": true, + "license_model": true, + "port": true, + "snapshot_type": true, + "source_db_cluster_snapshot_arn": true, + "status": true, + "storage_encrypted": true, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_neptune_cluster_snapshot", + }, + { + "address": "aws_network_interface.web-eni", + "change": { + "actions": [ + "create", + ], + "after": { + "description": null, + "private_ips": [ + "172.16.10.100", + ], + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-primary_network_interface", + }, + }, + "after_unknown": { + "attachment": true, + "id": true, + "ipv6_address_count": true, + "ipv6_addresses": true, + "mac_address": true, + "outpost_arn": true, + "private_dns_name": true, + "private_ip": true, + "private_ips": [ + false, + ], + "private_ips_count": true, + "security_groups": true, + "subnet_id": true, + "tags": {}, + }, + "before": null, + }, + "mode": "managed", + "name": "web-eni", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_network_interface", + }, + { + "address": "aws_route.public_internet_gateway", + "change": { + "actions": [ + "create", + ], + "after": { + "carrier_gateway_id": null, + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": null, + "destination_prefix_list_id": null, + "egress_only_gateway_id": null, + "local_gateway_id": null, + "nat_gateway_id": null, + "timeouts": { + "create": "5m", + "delete": null, + }, + "transit_gateway_id": null, + "vpc_endpoint_id": null, + "vpc_peering_connection_id": null, + }, + "after_unknown": { + "gateway_id": true, + "id": true, + "instance_id": true, + "instance_owner_id": true, + "network_interface_id": true, + "origin": true, + "route_table_id": true, + "state": true, + "timeouts": {}, + }, + "before": null, + }, + "mode": "managed", + "name": "public_internet_gateway", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_route", + }, + { + "address": "aws_route_table.web_rtb", + "change": { + "actions": [ + "create", + ], + "after": { + "tags": { + "Name": "123456789123-acme-dev-rtb", + }, + }, + "after_unknown": { + "arn": true, + "id": true, + "owner_id": true, + "propagating_vgws": true, + "route": true, + "tags": {}, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "web_rtb", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_route_table", + }, + { + "address": "aws_route_table_association.rtbassoc", + "change": { + "actions": [ + "create", + ], + "after": { + "gateway_id": null, + }, + "after_unknown": { + "id": true, + "route_table_id": true, + "subnet_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "rtbassoc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_route_table_association", + }, + { + "address": "aws_route_table_association.rtbassoc2", + "change": { + "actions": [ + "create", + ], + "after": { + "gateway_id": null, + }, + "after_unknown": { + "id": true, + "route_table_id": true, + "subnet_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "rtbassoc2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_route_table_association", + }, + { + "address": "aws_s3_bucket.data", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "public-read", + "bucket": "123456789123-acme-dev-data", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-data", + }, + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "tags": {}, + "versioning": true, + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "mode": "managed", + "name": "data", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.data_science", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "bucket": "123456789123-acme-dev-data-science", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [ + { + "target_prefix": "log/", + }, + ], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": null, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [ + { + "target_bucket": true, + }, + ], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "versioning": [ + {}, + ], + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "mode": "managed", + "name": "data_science", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.financials", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "bucket": "123456789123-acme-dev-financials", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-financials", + }, + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "tags": {}, + "versioning": true, + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "mode": "managed", + "name": "financials", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.flowbucket", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "bucket": "123456789123-acme-dev-flowlogs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "tags": {}, + "versioning": true, + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "mode": "managed", + "name": "flowbucket", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.logs", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "log-delivery-write", + "bucket": "123456789123-acme-dev-logs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "sse_algorithm": "aws:kms", + }, + ], + "bucket_key_enabled": null, + }, + ], + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-logs", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "kms_master_key_id": true, + }, + ], + }, + ], + }, + ], + "tags": {}, + "versioning": [ + {}, + ], + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "mode": "managed", + "name": "logs", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket.operations", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "bucket": "123456789123-acme-dev-operations", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-operations", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + "after_unknown": { + "acceleration_status": true, + "arn": true, + "bucket_domain_name": true, + "bucket_regional_domain_name": true, + "cors_rule": [], + "grant": [], + "hosted_zone_id": true, + "id": true, + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "region": true, + "replication_configuration": [], + "request_payer": true, + "server_side_encryption_configuration": [], + "tags": {}, + "versioning": [ + {}, + ], + "website": [], + "website_domain": true, + "website_endpoint": true, + }, + "before": null, + }, + "mode": "managed", + "name": "operations", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket", + }, + { + "address": "aws_s3_bucket_object.data_object", + "change": { + "actions": [ + "create", + ], + "after": { + "acl": "private", + "cache_control": null, + "content": null, + "content_base64": null, + "content_disposition": null, + "content_encoding": null, + "content_language": null, + "force_destroy": false, + "key": "customer-master.xlsx", + "metadata": null, + "object_lock_legal_hold_status": null, + "object_lock_mode": null, + "object_lock_retain_until_date": null, + "source": "resources/customer-master.xlsx", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-customer-master", + }, + "website_redirect": null, + }, + "after_unknown": { + "bucket": true, + "bucket_key_enabled": true, + "content_type": true, + "etag": true, + "id": true, + "kms_key_id": true, + "server_side_encryption": true, + "storage_class": true, + "tags": {}, + "version_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "data_object", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_s3_bucket_object", + }, + { + "address": "aws_security_group.default", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "Managed by Terraform", + "name": "123456789123-acme-dev-rds-sg", + "revoke_rules_on_delete": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds-sg", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "egress": true, + "id": true, + "ingress": true, + "name_prefix": true, + "owner_id": true, + "tags": {}, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "default", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_security_group", + }, + { + "address": "aws_security_group.web-node", + "change": { + "actions": [ + "create", + ], + "after": { + "description": "123456789123-acme-dev Security Group", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0, + }, + ], + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 22, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 22, + }, + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 80, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 80, + }, + ], + "name": "123456789123-acme-dev-sg", + "revoke_rules_on_delete": false, + "tags": null, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "egress": [ + { + "cidr_blocks": [ + false, + ], + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "security_groups": [], + }, + ], + "id": true, + "ingress": [ + { + "cidr_blocks": [ + false, + ], + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "security_groups": [], + }, + { + "cidr_blocks": [ + false, + ], + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "security_groups": [], + }, + ], + "name_prefix": true, + "owner_id": true, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "web-node", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_security_group", + }, + { + "address": "aws_security_group_rule.egress", + "change": { + "actions": [ + "create", + ], + "after": { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": null, + "from_port": 0, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "-1", + "self": false, + "to_port": 0, + "type": "egress", + }, + "after_unknown": { + "cidr_blocks": [ + false, + ], + "id": true, + "security_group_id": true, + "source_security_group_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "egress", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_security_group_rule", + }, + { + "address": "aws_security_group_rule.ingress", + "change": { + "actions": [ + "create", + ], + "after": { + "cidr_blocks": [ + "172.16.0.0/16", + ], + "description": null, + "from_port": 3306, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "tcp", + "self": false, + "to_port": 3306, + "type": "ingress", + }, + "after_unknown": { + "cidr_blocks": [ + false, + ], + "id": true, + "security_group_id": true, + "source_security_group_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "ingress", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_security_group_rule", + }, + { + "address": "aws_subnet.eks_subnet1", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "10.10.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zone_id": true, + "id": true, + "ipv6_cidr_block_association_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "eks_subnet1", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_subnet", + }, + { + "address": "aws_subnet.eks_subnet2", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "10.10.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zone_id": true, + "id": true, + "ipv6_cidr_block_association_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "eks_subnet2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_subnet", + }, + { + "address": "aws_subnet.web_subnet", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "172.16.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zone_id": true, + "id": true, + "ipv6_cidr_block_association_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "web_subnet", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_subnet", + }, + { + "address": "aws_subnet.web_subnet2", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "172.16.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet2", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet2", + }, + "timeouts": null, + }, + "after_unknown": { + "arn": true, + "availability_zone_id": true, + "id": true, + "ipv6_cidr_block_association_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + "vpc_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "web_subnet2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_subnet", + }, + { + "address": "aws_volume_attachment.ebs_att", + "change": { + "actions": [ + "create", + ], + "after": { + "device_name": "/dev/sdh", + "force_detach": null, + "skip_destroy": null, + }, + "after_unknown": { + "id": true, + "instance_id": true, + "volume_id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "ebs_att", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_volume_attachment", + }, + { + "address": "aws_vpc.eks_vpc", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.10.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + }, + "after_unknown": { + "arn": true, + "default_network_acl_id": true, + "default_route_table_id": true, + "default_security_group_id": true, + "dhcp_options_id": true, + "enable_classiclink": true, + "enable_classiclink_dns_support": true, + "id": true, + "ipv6_association_id": true, + "ipv6_cidr_block": true, + "main_route_table_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + }, + "before": null, + }, + "mode": "managed", + "name": "eks_vpc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_vpc", + }, + { + "address": "aws_vpc.web_vpc", + "change": { + "actions": [ + "create", + ], + "after": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "172.16.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-vpc", + }, + }, + "after_unknown": { + "arn": true, + "default_network_acl_id": true, + "default_route_table_id": true, + "default_security_group_id": true, + "dhcp_options_id": true, + "enable_classiclink": true, + "enable_classiclink_dns_support": true, + "id": true, + "ipv6_association_id": true, + "ipv6_cidr_block": true, + "main_route_table_id": true, + "owner_id": true, + "tags": {}, + "tags_all": {}, + }, + "before": null, + }, + "mode": "managed", + "name": "web_vpc", + "provider_name": "registry.terraform.io/hashicorp/aws", + "type": "aws_vpc", + }, + { + "address": "null_resource.push_image", + "change": { + "actions": [ + "create", + ], + "after": { + "triggers": null, + }, + "after_unknown": { + "id": true, + }, + "before": null, + }, + "mode": "managed", + "name": "push_image", + "provider_name": "registry.terraform.io/hashicorp/null", + "type": "null_resource", + }, + ], + "terraform_version": "0.14.7", + "variables": { + "ami": { + "value": "ami-09a5b0b7edf08843d", + }, + "availability_zone": { + "value": "us-west-2a", + }, + "availability_zone2": { + "value": "us-west-2b", + }, + "company_name": { + "value": "acme", + }, + "dbname": { + "value": "db1", + }, + "environment": { + "value": "dev", + }, + "neptune-dbname": { + "value": "neptunedb1", + }, + "password": { + "value": "Aa1234321Bb", + }, + "profile": { + "value": "default", + }, + "region": { + "value": "us-west-2", + }, + }, +} diff --git a/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfplan.sentinel b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfplan.sentinel new file mode 100644 index 0000000..30245f6 --- /dev/null +++ b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfplan.sentinel @@ -0,0 +1,6639 @@ +import "strings" +import "types" + +_modules = { + "root": { + "data": {}, + "path": [], + "resources": { + "aws_db_instance": { + "default": { + 0: { + "applied": { + "allocated_storage": 20, + "allow_major_version_upgrade": null, + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "backup_retention_period": 0, + "copy_tags_to_snapshot": false, + "db_subnet_group_name": "sg-123456789123-acme-dev", + "delete_automated_backups": true, + "deletion_protection": null, + "domain": null, + "domain_iam_role_name": null, + "enabled_cloudwatch_logs_exports": null, + "engine": "mysql", + "engine_version": "8.0", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": null, + "identifier": "rds-123456789123-acme-dev", + "instance_class": "db.t3.micro", + "iops": null, + "max_allocated_storage": null, + "monitoring_interval": 0, + "multi_az": false, + "name": "db1", + "option_group_name": "og-123456789123-acme-dev", + "parameter_group_name": "pg-123456789123-acme-dev", + "password": "Aa1234321Bb", + "performance_insights_enabled": false, + "publicly_accessible": true, + "replicate_source_db": null, + "restore_to_point_in_time": [], + "s3_import": [], + "security_group_names": null, + "skip_final_snapshot": true, + "storage_encrypted": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds", + }, + "timeouts": null, + "username": "admin", + }, + "destroy": false, + "diff": { + "address": { + "computed": true, + "new": "", + "old": "", + }, + "allocated_storage": { + "computed": false, + "new": "20", + "old": "", + }, + "allow_major_version_upgrade": { + "computed": false, + "new": "", + "old": "", + }, + "apply_immediately": { + "computed": false, + "new": "true", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "auto_minor_version_upgrade": { + "computed": false, + "new": "true", + "old": "", + }, + "availability_zone": { + "computed": true, + "new": "", + "old": "", + }, + "backup_retention_period": { + "computed": false, + "new": "0", + "old": "", + }, + "backup_window": { + "computed": true, + "new": "", + "old": "", + }, + "ca_cert_identifier": { + "computed": true, + "new": "", + "old": "", + }, + "character_set_name": { + "computed": true, + "new": "", + "old": "", + }, + "copy_tags_to_snapshot": { + "computed": false, + "new": "false", + "old": "", + }, + "db_subnet_group_name": { + "computed": false, + "new": "sg-123456789123-acme-dev", + "old": "", + }, + "delete_automated_backups": { + "computed": false, + "new": "true", + "old": "", + }, + "deletion_protection": { + "computed": false, + "new": "", + "old": "", + }, + "domain": { + "computed": false, + "new": "", + "old": "", + }, + "domain_iam_role_name": { + "computed": false, + "new": "", + "old": "", + }, + "enabled_cloudwatch_logs_exports": { + "computed": false, + "new": "", + "old": "", + }, + "endpoint": { + "computed": true, + "new": "", + "old": "", + }, + "engine": { + "computed": false, + "new": "mysql", + "old": "", + }, + "engine_version": { + "computed": false, + "new": "8.0", + "old": "", + }, + "final_snapshot_identifier": { + "computed": false, + "new": "", + "old": "", + }, + "hosted_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "iam_database_authentication_enabled": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "identifier": { + "computed": false, + "new": "rds-123456789123-acme-dev", + "old": "", + }, + "identifier_prefix": { + "computed": true, + "new": "", + "old": "", + }, + "instance_class": { + "computed": false, + "new": "db.t3.micro", + "old": "", + }, + "iops": { + "computed": false, + "new": "", + "old": "", + }, + "kms_key_id": { + "computed": true, + "new": "", + "old": "", + }, + "latest_restorable_time": { + "computed": true, + "new": "", + "old": "", + }, + "license_model": { + "computed": true, + "new": "", + "old": "", + }, + "maintenance_window": { + "computed": true, + "new": "", + "old": "", + }, + "max_allocated_storage": { + "computed": false, + "new": "", + "old": "", + }, + "monitoring_interval": { + "computed": false, + "new": "0", + "old": "", + }, + "monitoring_role_arn": { + "computed": true, + "new": "", + "old": "", + }, + "multi_az": { + "computed": false, + "new": "false", + "old": "", + }, + "name": { + "computed": false, + "new": "db1", + "old": "", + }, + "option_group_name": { + "computed": false, + "new": "og-123456789123-acme-dev", + "old": "", + }, + "parameter_group_name": { + "computed": false, + "new": "pg-123456789123-acme-dev", + "old": "", + }, + "password": { + "computed": false, + "new": "Aa1234321Bb", + "old": "", + }, + "performance_insights_enabled": { + "computed": false, + "new": "false", + "old": "", + }, + "performance_insights_kms_key_id": { + "computed": true, + "new": "", + "old": "", + }, + "performance_insights_retention_period": { + "computed": true, + "new": "", + "old": "", + }, + "port": { + "computed": true, + "new": "", + "old": "", + }, + "publicly_accessible": { + "computed": false, + "new": "true", + "old": "", + }, + "replicas.#": { + "computed": true, + "new": "", + "old": "", + }, + "replicate_source_db": { + "computed": false, + "new": "", + "old": "", + }, + "resource_id": { + "computed": true, + "new": "", + "old": "", + }, + "restore_to_point_in_time.#": { + "computed": false, + "new": "0", + "old": "", + }, + "s3_import.#": { + "computed": false, + "new": "0", + "old": "", + }, + "security_group_names": { + "computed": false, + "new": "", + "old": "", + }, + "skip_final_snapshot": { + "computed": false, + "new": "true", + "old": "", + }, + "snapshot_identifier": { + "computed": true, + "new": "", + "old": "", + }, + "status": { + "computed": true, + "new": "", + "old": "", + }, + "storage_encrypted": { + "computed": false, + "new": "false", + "old": "", + }, + "storage_type": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-rds", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "timezone": { + "computed": true, + "new": "", + "old": "", + }, + "username": { + "computed": false, + "new": "admin", + "old": "", + }, + "vpc_security_group_ids.#": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_db_option_group": { + "default": { + 0: { + "applied": { + "engine_name": "mysql", + "major_engine_version": "8.0", + "name": "og-123456789123-acme-dev", + "option": [], + "option_group_description": "Terraform OG", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-og", + }, + "timeouts": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "engine_name": { + "computed": false, + "new": "mysql", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "major_engine_version": { + "computed": false, + "new": "8.0", + "old": "", + }, + "name": { + "computed": false, + "new": "og-123456789123-acme-dev", + "old": "", + }, + "name_prefix": { + "computed": true, + "new": "", + "old": "", + }, + "option.#": { + "computed": false, + "new": "0", + "old": "", + }, + "option_group_description": { + "computed": false, + "new": "Terraform OG", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-og", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_db_parameter_group": { + "default": { + 0: { + "applied": { + "description": "Terraform PG", + "family": "mysql8.0", + "name": "pg-123456789123-acme-dev", + "parameter": [ + { + "apply_method": "immediate", + "name": "character_set_client", + "value": "utf8", + }, + { + "apply_method": "immediate", + "name": "character_set_server", + "value": "utf8", + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-pg", + }, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "description": { + "computed": false, + "new": "Terraform PG", + "old": "", + }, + "family": { + "computed": false, + "new": "mysql8.0", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "pg-123456789123-acme-dev", + "old": "", + }, + "name_prefix": { + "computed": true, + "new": "", + "old": "", + }, + "parameter.#": { + "computed": false, + "new": "2", + "old": "", + }, + "parameter.0.%": { + "computed": false, + "new": "3", + "old": "", + }, + "parameter.0.apply_method": { + "computed": false, + "new": "immediate", + "old": "", + }, + "parameter.0.name": { + "computed": false, + "new": "character_set_client", + "old": "", + }, + "parameter.0.value": { + "computed": false, + "new": "utf8", + "old": "", + }, + "parameter.1.%": { + "computed": false, + "new": "3", + "old": "", + }, + "parameter.1.apply_method": { + "computed": false, + "new": "immediate", + "old": "", + }, + "parameter.1.name": { + "computed": false, + "new": "character_set_server", + "old": "", + }, + "parameter.1.value": { + "computed": false, + "new": "utf8", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-pg", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_db_subnet_group": { + "default": { + 0: { + "applied": { + "description": "Terraform DB Subnet Group", + "name": "sg-123456789123-acme-dev", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "sg-123456789123-acme-dev", + }, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "description": { + "computed": false, + "new": "Terraform DB Subnet Group", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "sg-123456789123-acme-dev", + "old": "", + }, + "name_prefix": { + "computed": true, + "new": "", + "old": "", + }, + "subnet_ids.#": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "sg-123456789123-acme-dev", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_ebs_snapshot": { + "example_snapshot": { + 0: { + "applied": { + "description": "123456789123-acme-dev-ebs-snapshot", + "tags": { + "Name": "123456789123-acme-dev-ebs-snapshot", + }, + "timeouts": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "data_encryption_key_id": { + "computed": true, + "new": "", + "old": "", + }, + "description": { + "computed": false, + "new": "123456789123-acme-dev-ebs-snapshot", + "old": "", + }, + "encrypted": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "kms_key_id": { + "computed": true, + "new": "", + "old": "", + }, + "owner_alias": { + "computed": true, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-ebs-snapshot", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "volume_id": { + "computed": true, + "new": "", + "old": "", + }, + "volume_size": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_ebs_volume": { + "web_host_storage": { + 0: { + "applied": { + "availability_zone": "us-west-2a", + "multi_attach_enabled": null, + "outpost_arn": null, + "size": 1, + "tags": { + "Name": "123456789123-acme-dev-ebs", + }, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "availability_zone": { + "computed": false, + "new": "us-west-2a", + "old": "", + }, + "encrypted": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "iops": { + "computed": true, + "new": "", + "old": "", + }, + "kms_key_id": { + "computed": true, + "new": "", + "old": "", + }, + "multi_attach_enabled": { + "computed": false, + "new": "", + "old": "", + }, + "outpost_arn": { + "computed": false, + "new": "", + "old": "", + }, + "size": { + "computed": false, + "new": "1", + "old": "", + }, + "snapshot_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-ebs", + "old": "", + }, + "throughput": { + "computed": true, + "new": "", + "old": "", + }, + "type": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_ecr_repository": { + "repository": { + 0: { + "applied": { + "encryption_configuration": [], + "image_scanning_configuration": [], + "image_tag_mutability": "MUTABLE", + "name": "123456789123-acme-dev-repository", + "tags": { + "Name": "123456789123-acme-dev-repository", + }, + "timeouts": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "encryption_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "image_scanning_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "image_tag_mutability": { + "computed": false, + "new": "MUTABLE", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-repository", + "old": "", + }, + "registry_id": { + "computed": true, + "new": "", + "old": "", + }, + "repository_url": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-repository", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_eks_cluster": { + "eks_cluster": { + 0: { + "applied": { + "enabled_cluster_log_types": null, + "encryption_config": [], + "name": "123456789123-acme-dev-eks", + "tags": null, + "timeouts": null, + "vpc_config": [ + { + "endpoint_private_access": true, + "endpoint_public_access": true, + "security_group_ids": null, + }, + ], + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "certificate_authority.#": { + "computed": true, + "new": "", + "old": "", + }, + "created_at": { + "computed": true, + "new": "", + "old": "", + }, + "enabled_cluster_log_types": { + "computed": false, + "new": "", + "old": "", + }, + "encryption_config.#": { + "computed": false, + "new": "0", + "old": "", + }, + "endpoint": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "identity.#": { + "computed": true, + "new": "", + "old": "", + }, + "kubernetes_network_config.#": { + "computed": true, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-eks", + "old": "", + }, + "platform_version": { + "computed": true, + "new": "", + "old": "", + }, + "role_arn": { + "computed": true, + "new": "", + "old": "", + }, + "status": { + "computed": true, + "new": "", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "version": { + "computed": true, + "new": "", + "old": "", + }, + "vpc_config.#": { + "computed": false, + "new": "1", + "old": "", + }, + "vpc_config.0.%": { + "computed": true, + "new": "", + "old": "", + }, + "vpc_config.0.cluster_security_group_id": { + "computed": true, + "new": "", + "old": "", + }, + "vpc_config.0.endpoint_private_access": { + "computed": false, + "new": "true", + "old": "", + }, + "vpc_config.0.endpoint_public_access": { + "computed": false, + "new": "true", + "old": "", + }, + "vpc_config.0.public_access_cidrs": { + "computed": true, + "new": "", + "old": "", + }, + "vpc_config.0.security_group_ids": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_config.0.subnet_ids": { + "computed": true, + "new": "", + "old": "", + }, + "vpc_config.0.vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_elasticsearch_domain": { + "monitoring-framework": { + 0: { + "applied": { + "cluster_config": [ + { + "dedicated_master_count": null, + "dedicated_master_enabled": false, + "dedicated_master_type": null, + "instance_count": 1, + "instance_type": "t2.small.elasticsearch", + "warm_count": null, + "warm_enabled": null, + "warm_type": null, + "zone_awareness_config": [], + "zone_awareness_enabled": null, + }, + ], + "cognito_options": [], + "domain_name": "tg-dev-es", + "ebs_options": [ + { + "ebs_enabled": true, + "iops": null, + "volume_size": 30, + }, + ], + "elasticsearch_version": "2.3", + "log_publishing_options": [], + "snapshot_options": [], + "tags": null, + "timeouts": null, + "vpc_options": [], + }, + "destroy": false, + "diff": { + "access_policies": { + "computed": true, + "new": "", + "old": "", + }, + "advanced_options.%": { + "computed": true, + "new": "", + "old": "", + }, + "advanced_security_options.#": { + "computed": true, + "new": "", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "cluster_config.#": { + "computed": false, + "new": "1", + "old": "", + }, + "cluster_config.0.%": { + "computed": false, + "new": "10", + "old": "", + }, + "cluster_config.0.dedicated_master_count": { + "computed": false, + "new": "", + "old": "", + }, + "cluster_config.0.dedicated_master_enabled": { + "computed": false, + "new": "false", + "old": "", + }, + "cluster_config.0.dedicated_master_type": { + "computed": false, + "new": "", + "old": "", + }, + "cluster_config.0.instance_count": { + "computed": false, + "new": "1", + "old": "", + }, + "cluster_config.0.instance_type": { + "computed": false, + "new": "t2.small.elasticsearch", + "old": "", + }, + "cluster_config.0.warm_count": { + "computed": false, + "new": "", + "old": "", + }, + "cluster_config.0.warm_enabled": { + "computed": false, + "new": "", + "old": "", + }, + "cluster_config.0.warm_type": { + "computed": false, + "new": "", + "old": "", + }, + "cluster_config.0.zone_awareness_config.#": { + "computed": false, + "new": "0", + "old": "", + }, + "cluster_config.0.zone_awareness_enabled": { + "computed": false, + "new": "", + "old": "", + }, + "cognito_options.#": { + "computed": false, + "new": "0", + "old": "", + }, + "domain_endpoint_options.#": { + "computed": true, + "new": "", + "old": "", + }, + "domain_id": { + "computed": true, + "new": "", + "old": "", + }, + "domain_name": { + "computed": false, + "new": "tg-dev-es", + "old": "", + }, + "ebs_options.#": { + "computed": false, + "new": "1", + "old": "", + }, + "ebs_options.0.%": { + "computed": true, + "new": "", + "old": "", + }, + "ebs_options.0.ebs_enabled": { + "computed": false, + "new": "true", + "old": "", + }, + "ebs_options.0.iops": { + "computed": false, + "new": "", + "old": "", + }, + "ebs_options.0.volume_size": { + "computed": false, + "new": "30", + "old": "", + }, + "ebs_options.0.volume_type": { + "computed": true, + "new": "", + "old": "", + }, + "elasticsearch_version": { + "computed": false, + "new": "2.3", + "old": "", + }, + "encrypt_at_rest.#": { + "computed": true, + "new": "", + "old": "", + }, + "endpoint": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "kibana_endpoint": { + "computed": true, + "new": "", + "old": "", + }, + "log_publishing_options.#": { + "computed": false, + "new": "0", + "old": "", + }, + "node_to_node_encryption.#": { + "computed": true, + "new": "", + "old": "", + }, + "snapshot_options.#": { + "computed": false, + "new": "0", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_options.#": { + "computed": false, + "new": "0", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_elasticsearch_domain_policy": { + "monitoring-framework-policy": { + 0: { + "applied": { + "access_policies": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "domain_name": "tg-dev-es", + }, + "destroy": false, + "diff": { + "access_policies": { + "computed": false, + "new": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "old": "", + }, + "domain_name": { + "computed": false, + "new": "tg-dev-es", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_elb": { + "weblb": { + 0: { + "applied": { + "access_logs": [], + "connection_draining": true, + "connection_draining_timeout": 400, + "cross_zone_load_balancing": true, + "health_check": [ + { + "healthy_threshold": 2, + "interval": 30, + "target": "HTTP:8000/", + "timeout": 3, + "unhealthy_threshold": 2, + }, + ], + "idle_timeout": 400, + "listener": [ + { + "instance_port": 8000, + "instance_protocol": "http", + "lb_port": 80, + "lb_protocol": "http", + "ssl_certificate_id": "", + }, + ], + "name": "weblb-terraform-elb", + "name_prefix": null, + "tags": { + "Name": "foobar-terraform-elb", + }, + }, + "destroy": false, + "diff": { + "access_logs.#": { + "computed": false, + "new": "0", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "availability_zones.#": { + "computed": true, + "new": "", + "old": "", + }, + "connection_draining": { + "computed": false, + "new": "true", + "old": "", + }, + "connection_draining_timeout": { + "computed": false, + "new": "400", + "old": "", + }, + "cross_zone_load_balancing": { + "computed": false, + "new": "true", + "old": "", + }, + "dns_name": { + "computed": true, + "new": "", + "old": "", + }, + "health_check.#": { + "computed": false, + "new": "1", + "old": "", + }, + "health_check.0.%": { + "computed": false, + "new": "5", + "old": "", + }, + "health_check.0.healthy_threshold": { + "computed": false, + "new": "2", + "old": "", + }, + "health_check.0.interval": { + "computed": false, + "new": "30", + "old": "", + }, + "health_check.0.target": { + "computed": false, + "new": "HTTP:8000/", + "old": "", + }, + "health_check.0.timeout": { + "computed": false, + "new": "3", + "old": "", + }, + "health_check.0.unhealthy_threshold": { + "computed": false, + "new": "2", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "idle_timeout": { + "computed": false, + "new": "400", + "old": "", + }, + "instances.#": { + "computed": true, + "new": "", + "old": "", + }, + "internal": { + "computed": true, + "new": "", + "old": "", + }, + "listener.#": { + "computed": false, + "new": "1", + "old": "", + }, + "listener.0.%": { + "computed": false, + "new": "5", + "old": "", + }, + "listener.0.instance_port": { + "computed": false, + "new": "8000", + "old": "", + }, + "listener.0.instance_protocol": { + "computed": false, + "new": "http", + "old": "", + }, + "listener.0.lb_port": { + "computed": false, + "new": "80", + "old": "", + }, + "listener.0.lb_protocol": { + "computed": false, + "new": "http", + "old": "", + }, + "listener.0.ssl_certificate_id": { + "computed": false, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "weblb-terraform-elb", + "old": "", + }, + "name_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "security_groups.#": { + "computed": true, + "new": "", + "old": "", + }, + "source_security_group": { + "computed": true, + "new": "", + "old": "", + }, + "source_security_group_id": { + "computed": true, + "new": "", + "old": "", + }, + "subnets.#": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "foobar-terraform-elb", + "old": "", + }, + "zone_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_flow_log": { + "vpcflowlogs": { + 0: { + "applied": { + "eni_id": null, + "iam_role_arn": null, + "log_destination_type": "s3", + "max_aggregation_interval": 600, + "subnet_id": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "traffic_type": "ALL", + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "eni_id": { + "computed": false, + "new": "", + "old": "", + }, + "iam_role_arn": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "log_destination": { + "computed": true, + "new": "", + "old": "", + }, + "log_destination_type": { + "computed": false, + "new": "s3", + "old": "", + }, + "log_format": { + "computed": true, + "new": "", + "old": "", + }, + "log_group_name": { + "computed": true, + "new": "", + "old": "", + }, + "max_aggregation_interval": { + "computed": false, + "new": "600", + "old": "", + }, + "subnet_id": { + "computed": false, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-flowlogs", + "old": "", + }, + "traffic_type": { + "computed": false, + "new": "ALL", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_iam_access_key": { + "user": { + 0: { + "applied": { + "pgp_key": null, + "user": "123456789123-acme-dev-user", + }, + "destroy": false, + "diff": { + "create_date": { + "computed": true, + "new": "", + "old": "", + }, + "encrypted_secret": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "key_fingerprint": { + "computed": true, + "new": "", + "old": "", + }, + "pgp_key": { + "computed": false, + "new": "", + "old": "", + }, + "secret": { + "computed": true, + "new": "", + "old": "", + }, + "ses_smtp_password_v4": { + "computed": true, + "new": "", + "old": "", + }, + "status": { + "computed": true, + "new": "", + "old": "", + }, + "user": { + "computed": false, + "new": "123456789123-acme-dev-user", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_iam_instance_profile": { + "ec2profile": { + 0: { + "applied": { + "name": "123456789123-acme-dev-profile", + "name_prefix": null, + "path": "/", + "role": "123456789123-acme-dev-role", + "tags": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "create_date": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-profile", + "old": "", + }, + "name_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "path": { + "computed": false, + "new": "/", + "old": "", + }, + "role": { + "computed": false, + "new": "123456789123-acme-dev-role", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "unique_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_iam_role": { + "ec2role": { + 0: { + "applied": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-role", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-role", + }, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "assume_role_policy": { + "computed": false, + "new": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "old": "", + }, + "create_date": { + "computed": true, + "new": "", + "old": "", + }, + "description": { + "computed": false, + "new": "", + "old": "", + }, + "force_detach_policies": { + "computed": false, + "new": "false", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "inline_policy.#": { + "computed": true, + "new": "", + "old": "", + }, + "managed_policy_arns.#": { + "computed": true, + "new": "", + "old": "", + }, + "max_session_duration": { + "computed": false, + "new": "3600", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-role", + "old": "", + }, + "name_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "path": { + "computed": false, + "new": "/", + "old": "", + }, + "permissions_boundary": { + "computed": false, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-role", + "old": "", + }, + "unique_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "iam_for_eks": { + 0: { + "applied": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-iam-for-eks", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "assume_role_policy": { + "computed": false, + "new": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "old": "", + }, + "create_date": { + "computed": true, + "new": "", + "old": "", + }, + "description": { + "computed": false, + "new": "", + "old": "", + }, + "force_detach_policies": { + "computed": false, + "new": "false", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "inline_policy.#": { + "computed": true, + "new": "", + "old": "", + }, + "managed_policy_arns.#": { + "computed": true, + "new": "", + "old": "", + }, + "max_session_duration": { + "computed": false, + "new": "3600", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-iam-for-eks", + "old": "", + }, + "name_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "path": { + "computed": false, + "new": "/", + "old": "", + }, + "permissions_boundary": { + "computed": false, + "new": "", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "unique_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "iam_for_lambda": { + 0: { + "applied": { + "assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "description": null, + "force_detach_policies": false, + "max_session_duration": 3600, + "name": "123456789123-acme-dev-analysis-lambda", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "assume_role_policy": { + "computed": false, + "new": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\",\n \"Sid\": \"\"\n }\n ]\n}\n", + "old": "", + }, + "create_date": { + "computed": true, + "new": "", + "old": "", + }, + "description": { + "computed": false, + "new": "", + "old": "", + }, + "force_detach_policies": { + "computed": false, + "new": "false", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "inline_policy.#": { + "computed": true, + "new": "", + "old": "", + }, + "managed_policy_arns.#": { + "computed": true, + "new": "", + "old": "", + }, + "max_session_duration": { + "computed": false, + "new": "3600", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-analysis-lambda", + "old": "", + }, + "name_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "path": { + "computed": false, + "new": "/", + "old": "", + }, + "permissions_boundary": { + "computed": false, + "new": "", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "unique_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_iam_role_policy": { + "ec2policy": { + 0: { + "applied": { + "name": "123456789123-acme-dev-policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + }, + "destroy": false, + "diff": { + "id": { + "computed": true, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-policy", + "old": "", + }, + "name_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "policy": { + "computed": false, + "new": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + "old": "", + }, + "role": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_iam_role_policy_attachment": { + "policy_attachment-AmazonEKSClusterPolicy": { + 0: { + "applied": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + "destroy": false, + "diff": { + "id": { + "computed": true, + "new": "", + "old": "", + }, + "policy_arn": { + "computed": false, + "new": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + "old": "", + }, + "role": { + "computed": false, + "new": "123456789123-acme-dev-iam-for-eks", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "policy_attachment-AmazonEKSServicePolicy": { + 0: { + "applied": { + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + "role": "123456789123-acme-dev-iam-for-eks", + }, + "destroy": false, + "diff": { + "id": { + "computed": true, + "new": "", + "old": "", + }, + "policy_arn": { + "computed": false, + "new": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + "old": "", + }, + "role": { + "computed": false, + "new": "123456789123-acme-dev-iam-for-eks", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_iam_user": { + "user": { + 0: { + "applied": { + "force_destroy": true, + "name": "123456789123-acme-dev-user", + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-user", + }, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "force_destroy": { + "computed": false, + "new": "true", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-user", + "old": "", + }, + "path": { + "computed": false, + "new": "/", + "old": "", + }, + "permissions_boundary": { + "computed": false, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-user", + "old": "", + }, + "unique_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_iam_user_policy": { + "userpolicy": { + 0: { + "applied": { + "name": "excess_policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + "user": "123456789123-acme-dev-user", + }, + "destroy": false, + "diff": { + "id": { + "computed": true, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "excess_policy", + "old": "", + }, + "name_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "policy": { + "computed": false, + "new": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + "old": "", + }, + "user": { + "computed": false, + "new": "123456789123-acme-dev-user", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_instance": { + "db_app": { + 0: { + "applied": { + "ami": "ami-06d584c1805ad64fb", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": "123456789123-acme-dev-profile", + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-dbapp", + }, + "timeouts": null, + "user_data_base64": null, + "volume_tags": null, + }, + "destroy": false, + "diff": { + "ami": { + "computed": false, + "new": "ami-06d584c1805ad64fb", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "associate_public_ip_address": { + "computed": true, + "new": "", + "old": "", + }, + "availability_zone": { + "computed": true, + "new": "", + "old": "", + }, + "cpu_core_count": { + "computed": true, + "new": "", + "old": "", + }, + "cpu_threads_per_core": { + "computed": true, + "new": "", + "old": "", + }, + "credit_specification.#": { + "computed": false, + "new": "0", + "old": "", + }, + "disable_api_termination": { + "computed": false, + "new": "", + "old": "", + }, + "ebs_block_device.#": { + "computed": true, + "new": "", + "old": "", + }, + "ebs_optimized": { + "computed": false, + "new": "", + "old": "", + }, + "enclave_options.#": { + "computed": true, + "new": "", + "old": "", + }, + "ephemeral_block_device.#": { + "computed": true, + "new": "", + "old": "", + }, + "get_password_data": { + "computed": false, + "new": "false", + "old": "", + }, + "hibernation": { + "computed": false, + "new": "", + "old": "", + }, + "host_id": { + "computed": true, + "new": "", + "old": "", + }, + "iam_instance_profile": { + "computed": false, + "new": "123456789123-acme-dev-profile", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "instance_initiated_shutdown_behavior": { + "computed": false, + "new": "", + "old": "", + }, + "instance_state": { + "computed": true, + "new": "", + "old": "", + }, + "instance_type": { + "computed": false, + "new": "t2.nano", + "old": "", + }, + "ipv6_address_count": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_addresses.#": { + "computed": true, + "new": "", + "old": "", + }, + "key_name": { + "computed": true, + "new": "", + "old": "", + }, + "metadata_options.#": { + "computed": true, + "new": "", + "old": "", + }, + "monitoring": { + "computed": false, + "new": "", + "old": "", + }, + "network_interface.#": { + "computed": true, + "new": "", + "old": "", + }, + "outpost_arn": { + "computed": true, + "new": "", + "old": "", + }, + "password_data": { + "computed": true, + "new": "", + "old": "", + }, + "placement_group": { + "computed": true, + "new": "", + "old": "", + }, + "primary_network_interface_id": { + "computed": true, + "new": "", + "old": "", + }, + "private_dns": { + "computed": true, + "new": "", + "old": "", + }, + "private_ip": { + "computed": true, + "new": "", + "old": "", + }, + "public_dns": { + "computed": true, + "new": "", + "old": "", + }, + "public_ip": { + "computed": true, + "new": "", + "old": "", + }, + "root_block_device.#": { + "computed": true, + "new": "", + "old": "", + }, + "secondary_private_ips.#": { + "computed": true, + "new": "", + "old": "", + }, + "security_groups.#": { + "computed": true, + "new": "", + "old": "", + }, + "source_dest_check": { + "computed": false, + "new": "true", + "old": "", + }, + "subnet_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-dbapp", + "old": "", + }, + "tenancy": { + "computed": true, + "new": "", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "user_data": { + "computed": true, + "new": "", + "old": "", + }, + "user_data_base64": { + "computed": false, + "new": "", + "old": "", + }, + "volume_tags": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_security_group_ids.#": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "web_host": { + 0: { + "applied": { + "ami": "ami-09a5b0b7edf08843d", + "credit_specification": [], + "disable_api_termination": null, + "ebs_optimized": null, + "get_password_data": false, + "hibernation": null, + "iam_instance_profile": null, + "instance_initiated_shutdown_behavior": null, + "instance_type": "t2.nano", + "monitoring": null, + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-ec2", + }, + "timeouts": null, + "user_data": "44c6c808e6449ee36dfcfc4ebd66c1b9634b40f2", + "user_data_base64": null, + "volume_tags": null, + }, + "destroy": false, + "diff": { + "ami": { + "computed": false, + "new": "ami-09a5b0b7edf08843d", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "associate_public_ip_address": { + "computed": true, + "new": "", + "old": "", + }, + "availability_zone": { + "computed": true, + "new": "", + "old": "", + }, + "cpu_core_count": { + "computed": true, + "new": "", + "old": "", + }, + "cpu_threads_per_core": { + "computed": true, + "new": "", + "old": "", + }, + "credit_specification.#": { + "computed": false, + "new": "0", + "old": "", + }, + "disable_api_termination": { + "computed": false, + "new": "", + "old": "", + }, + "ebs_block_device.#": { + "computed": true, + "new": "", + "old": "", + }, + "ebs_optimized": { + "computed": false, + "new": "", + "old": "", + }, + "enclave_options.#": { + "computed": true, + "new": "", + "old": "", + }, + "ephemeral_block_device.#": { + "computed": true, + "new": "", + "old": "", + }, + "get_password_data": { + "computed": false, + "new": "false", + "old": "", + }, + "hibernation": { + "computed": false, + "new": "", + "old": "", + }, + "host_id": { + "computed": true, + "new": "", + "old": "", + }, + "iam_instance_profile": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "instance_initiated_shutdown_behavior": { + "computed": false, + "new": "", + "old": "", + }, + "instance_state": { + "computed": true, + "new": "", + "old": "", + }, + "instance_type": { + "computed": false, + "new": "t2.nano", + "old": "", + }, + "ipv6_address_count": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_addresses.#": { + "computed": true, + "new": "", + "old": "", + }, + "key_name": { + "computed": true, + "new": "", + "old": "", + }, + "metadata_options.#": { + "computed": true, + "new": "", + "old": "", + }, + "monitoring": { + "computed": false, + "new": "", + "old": "", + }, + "network_interface.#": { + "computed": true, + "new": "", + "old": "", + }, + "outpost_arn": { + "computed": true, + "new": "", + "old": "", + }, + "password_data": { + "computed": true, + "new": "", + "old": "", + }, + "placement_group": { + "computed": true, + "new": "", + "old": "", + }, + "primary_network_interface_id": { + "computed": true, + "new": "", + "old": "", + }, + "private_dns": { + "computed": true, + "new": "", + "old": "", + }, + "private_ip": { + "computed": true, + "new": "", + "old": "", + }, + "public_dns": { + "computed": true, + "new": "", + "old": "", + }, + "public_ip": { + "computed": true, + "new": "", + "old": "", + }, + "root_block_device.#": { + "computed": true, + "new": "", + "old": "", + }, + "secondary_private_ips.#": { + "computed": true, + "new": "", + "old": "", + }, + "security_groups.#": { + "computed": true, + "new": "", + "old": "", + }, + "source_dest_check": { + "computed": false, + "new": "true", + "old": "", + }, + "subnet_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-ec2", + "old": "", + }, + "tenancy": { + "computed": true, + "new": "", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "user_data": { + "computed": false, + "new": "44c6c808e6449ee36dfcfc4ebd66c1b9634b40f2", + "old": "", + }, + "user_data_base64": { + "computed": false, + "new": "", + "old": "", + }, + "volume_tags": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_security_group_ids.#": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_internet_gateway": { + "web_igw": { + 0: { + "applied": { + "tags": { + "Name": "123456789123-acme-dev-igw", + }, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-igw", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_kms_alias": { + "logs_key_alias": { + 0: { + "applied": { + "name": "alias/123456789123-acme-dev-logs-bucket-key", + "name_prefix": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "alias/123456789123-acme-dev-logs-bucket-key", + "old": "", + }, + "name_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "target_key_arn": { + "computed": true, + "new": "", + "old": "", + }, + "target_key_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_kms_key": { + "logs_key": { + 0: { + "applied": { + "customer_master_key_spec": "SYMMETRIC_DEFAULT", + "deletion_window_in_days": 7, + "description": "123456789123-acme-dev-logs bucket key", + "enable_key_rotation": false, + "is_enabled": true, + "key_usage": "ENCRYPT_DECRYPT", + "tags": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "customer_master_key_spec": { + "computed": false, + "new": "SYMMETRIC_DEFAULT", + "old": "", + }, + "deletion_window_in_days": { + "computed": false, + "new": "7", + "old": "", + }, + "description": { + "computed": false, + "new": "123456789123-acme-dev-logs bucket key", + "old": "", + }, + "enable_key_rotation": { + "computed": false, + "new": "false", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "is_enabled": { + "computed": false, + "new": "true", + "old": "", + }, + "key_id": { + "computed": true, + "new": "", + "old": "", + }, + "key_usage": { + "computed": false, + "new": "ENCRYPT_DECRYPT", + "old": "", + }, + "policy": { + "computed": true, + "new": "", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_lambda_function": { + "analysis_lambda": { + 0: { + "applied": { + "code_signing_config_arn": null, + "dead_letter_config": [], + "description": null, + "environment": [ + { + "variables": { + "access_key": "{{REDACTED}}", + "secret_key": "{{REDACTED}}", + }, + }, + ], + "file_system_config": [], + "filename": "resources/lambda_function_payload.zip", + "function_name": "123456789123-acme-dev-analysis", + "handler": "exports.test", + "image_config": [], + "image_uri": null, + "kms_key_arn": null, + "layers": null, + "memory_size": 128, + "package_type": "Zip", + "publish": false, + "reserved_concurrent_executions": -1, + "runtime": "nodejs12.x", + "s3_bucket": null, + "s3_key": null, + "s3_object_version": null, + "source_code_hash": "Fne61Y/F2pmVywaVqIYcztFMK3LNeMJKpWFNnxDdGTw=", + "tags": null, + "timeout": 3, + "timeouts": null, + "vpc_config": [], + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "code_signing_config_arn": { + "computed": false, + "new": "", + "old": "", + }, + "dead_letter_config.#": { + "computed": false, + "new": "0", + "old": "", + }, + "description": { + "computed": false, + "new": "", + "old": "", + }, + "environment.#": { + "computed": false, + "new": "1", + "old": "", + }, + "environment.0.%": { + "computed": false, + "new": "1", + "old": "", + }, + "environment.0.variables.%": { + "computed": false, + "new": "2", + "old": "", + }, + "environment.0.variables.access_key": { + "computed": false, + "new": "{{REDACTED}}", + "old": "", + }, + "environment.0.variables.secret_key": { + "computed": false, + "new": "{{REDACTED}}", + "old": "", + }, + "file_system_config.#": { + "computed": false, + "new": "0", + "old": "", + }, + "filename": { + "computed": false, + "new": "resources/lambda_function_payload.zip", + "old": "", + }, + "function_name": { + "computed": false, + "new": "123456789123-acme-dev-analysis", + "old": "", + }, + "handler": { + "computed": false, + "new": "exports.test", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "image_config.#": { + "computed": false, + "new": "0", + "old": "", + }, + "image_uri": { + "computed": false, + "new": "", + "old": "", + }, + "invoke_arn": { + "computed": true, + "new": "", + "old": "", + }, + "kms_key_arn": { + "computed": false, + "new": "", + "old": "", + }, + "last_modified": { + "computed": true, + "new": "", + "old": "", + }, + "layers": { + "computed": false, + "new": "", + "old": "", + }, + "memory_size": { + "computed": false, + "new": "128", + "old": "", + }, + "package_type": { + "computed": false, + "new": "Zip", + "old": "", + }, + "publish": { + "computed": false, + "new": "false", + "old": "", + }, + "qualified_arn": { + "computed": true, + "new": "", + "old": "", + }, + "reserved_concurrent_executions": { + "computed": false, + "new": "-1", + "old": "", + }, + "role": { + "computed": true, + "new": "", + "old": "", + }, + "runtime": { + "computed": false, + "new": "nodejs12.x", + "old": "", + }, + "s3_bucket": { + "computed": false, + "new": "", + "old": "", + }, + "s3_key": { + "computed": false, + "new": "", + "old": "", + }, + "s3_object_version": { + "computed": false, + "new": "", + "old": "", + }, + "signing_job_arn": { + "computed": true, + "new": "", + "old": "", + }, + "signing_profile_version_arn": { + "computed": true, + "new": "", + "old": "", + }, + "source_code_hash": { + "computed": false, + "new": "Fne61Y/F2pmVywaVqIYcztFMK3LNeMJKpWFNnxDdGTw=", + "old": "", + }, + "source_code_size": { + "computed": true, + "new": "", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "timeout": { + "computed": false, + "new": "3", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "tracing_config.#": { + "computed": true, + "new": "", + "old": "", + }, + "version": { + "computed": true, + "new": "", + "old": "", + }, + "vpc_config.#": { + "computed": false, + "new": "0", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_neptune_cluster": { + "default": { + 0: { + "applied": { + "apply_immediately": true, + "backup_retention_period": 5, + "cluster_identifier": "neptunedb1", + "deletion_protection": null, + "enable_cloudwatch_logs_exports": null, + "engine": "neptune", + "final_snapshot_identifier": null, + "iam_database_authentication_enabled": false, + "iam_roles": null, + "neptune_cluster_parameter_group_name": "default.neptune1", + "port": 8182, + "preferred_backup_window": "07:00-09:00", + "replication_source_identifier": null, + "skip_final_snapshot": true, + "snapshot_identifier": null, + "storage_encrypted": false, + "tags": null, + "timeouts": null, + }, + "destroy": false, + "diff": { + "apply_immediately": { + "computed": false, + "new": "true", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "availability_zones.#": { + "computed": true, + "new": "", + "old": "", + }, + "backup_retention_period": { + "computed": false, + "new": "5", + "old": "", + }, + "cluster_identifier": { + "computed": false, + "new": "neptunedb1", + "old": "", + }, + "cluster_identifier_prefix": { + "computed": true, + "new": "", + "old": "", + }, + "cluster_members.#": { + "computed": true, + "new": "", + "old": "", + }, + "cluster_resource_id": { + "computed": true, + "new": "", + "old": "", + }, + "deletion_protection": { + "computed": false, + "new": "", + "old": "", + }, + "enable_cloudwatch_logs_exports": { + "computed": false, + "new": "", + "old": "", + }, + "endpoint": { + "computed": true, + "new": "", + "old": "", + }, + "engine": { + "computed": false, + "new": "neptune", + "old": "", + }, + "engine_version": { + "computed": true, + "new": "", + "old": "", + }, + "final_snapshot_identifier": { + "computed": false, + "new": "", + "old": "", + }, + "hosted_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "iam_database_authentication_enabled": { + "computed": false, + "new": "false", + "old": "", + }, + "iam_roles": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "kms_key_arn": { + "computed": true, + "new": "", + "old": "", + }, + "neptune_cluster_parameter_group_name": { + "computed": false, + "new": "default.neptune1", + "old": "", + }, + "neptune_subnet_group_name": { + "computed": true, + "new": "", + "old": "", + }, + "port": { + "computed": false, + "new": "8182", + "old": "", + }, + "preferred_backup_window": { + "computed": false, + "new": "07:00-09:00", + "old": "", + }, + "preferred_maintenance_window": { + "computed": true, + "new": "", + "old": "", + }, + "reader_endpoint": { + "computed": true, + "new": "", + "old": "", + }, + "replication_source_identifier": { + "computed": false, + "new": "", + "old": "", + }, + "skip_final_snapshot": { + "computed": false, + "new": "true", + "old": "", + }, + "snapshot_identifier": { + "computed": false, + "new": "", + "old": "", + }, + "storage_encrypted": { + "computed": false, + "new": "false", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_security_group_ids.#": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_neptune_cluster_instance": { + "default": { + 0: { + "applied": { + "apply_immediately": true, + "auto_minor_version_upgrade": true, + "engine": "neptune", + "instance_class": "db.t3.medium", + "neptune_parameter_group_name": "default.neptune1", + "port": 8182, + "promotion_tier": 0, + "publicly_accessible": false, + "tags": null, + "timeouts": null, + }, + "destroy": false, + "diff": { + "address": { + "computed": true, + "new": "", + "old": "", + }, + "apply_immediately": { + "computed": false, + "new": "true", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "auto_minor_version_upgrade": { + "computed": false, + "new": "true", + "old": "", + }, + "availability_zone": { + "computed": true, + "new": "", + "old": "", + }, + "cluster_identifier": { + "computed": true, + "new": "", + "old": "", + }, + "dbi_resource_id": { + "computed": true, + "new": "", + "old": "", + }, + "endpoint": { + "computed": true, + "new": "", + "old": "", + }, + "engine": { + "computed": false, + "new": "neptune", + "old": "", + }, + "engine_version": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "identifier": { + "computed": true, + "new": "", + "old": "", + }, + "identifier_prefix": { + "computed": true, + "new": "", + "old": "", + }, + "instance_class": { + "computed": false, + "new": "db.t3.medium", + "old": "", + }, + "kms_key_arn": { + "computed": true, + "new": "", + "old": "", + }, + "neptune_parameter_group_name": { + "computed": false, + "new": "default.neptune1", + "old": "", + }, + "neptune_subnet_group_name": { + "computed": true, + "new": "", + "old": "", + }, + "port": { + "computed": false, + "new": "8182", + "old": "", + }, + "preferred_backup_window": { + "computed": true, + "new": "", + "old": "", + }, + "preferred_maintenance_window": { + "computed": true, + "new": "", + "old": "", + }, + "promotion_tier": { + "computed": false, + "new": "0", + "old": "", + }, + "publicly_accessible": { + "computed": false, + "new": "false", + "old": "", + }, + "storage_encrypted": { + "computed": true, + "new": "", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "writer": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_neptune_cluster_snapshot": { + "default": { + 0: { + "applied": { + "db_cluster_snapshot_identifier": "resourcetestsnapshot1", + "timeouts": null, + }, + "destroy": false, + "diff": { + "allocated_storage": { + "computed": true, + "new": "", + "old": "", + }, + "availability_zones.#": { + "computed": true, + "new": "", + "old": "", + }, + "db_cluster_identifier": { + "computed": true, + "new": "", + "old": "", + }, + "db_cluster_snapshot_arn": { + "computed": true, + "new": "", + "old": "", + }, + "db_cluster_snapshot_identifier": { + "computed": false, + "new": "resourcetestsnapshot1", + "old": "", + }, + "engine": { + "computed": true, + "new": "", + "old": "", + }, + "engine_version": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "kms_key_id": { + "computed": true, + "new": "", + "old": "", + }, + "license_model": { + "computed": true, + "new": "", + "old": "", + }, + "port": { + "computed": true, + "new": "", + "old": "", + }, + "snapshot_type": { + "computed": true, + "new": "", + "old": "", + }, + "source_db_cluster_snapshot_arn": { + "computed": true, + "new": "", + "old": "", + }, + "status": { + "computed": true, + "new": "", + "old": "", + }, + "storage_encrypted": { + "computed": true, + "new": "", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_network_interface": { + "web-eni": { + 0: { + "applied": { + "description": null, + "private_ips": [ + "172.16.10.100", + ], + "source_dest_check": true, + "tags": { + "Name": "123456789123-acme-dev-primary_network_interface", + }, + }, + "destroy": false, + "diff": { + "attachment.#": { + "computed": true, + "new": "", + "old": "", + }, + "description": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_address_count": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_addresses.#": { + "computed": true, + "new": "", + "old": "", + }, + "mac_address": { + "computed": true, + "new": "", + "old": "", + }, + "outpost_arn": { + "computed": true, + "new": "", + "old": "", + }, + "private_dns_name": { + "computed": true, + "new": "", + "old": "", + }, + "private_ip": { + "computed": true, + "new": "", + "old": "", + }, + "private_ips.#": { + "computed": false, + "new": "1", + "old": "", + }, + "private_ips.0": { + "computed": false, + "new": "172.16.10.100", + "old": "", + }, + "private_ips_count": { + "computed": true, + "new": "", + "old": "", + }, + "security_groups.#": { + "computed": true, + "new": "", + "old": "", + }, + "source_dest_check": { + "computed": false, + "new": "true", + "old": "", + }, + "subnet_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-primary_network_interface", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_route": { + "public_internet_gateway": { + 0: { + "applied": { + "carrier_gateway_id": null, + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": null, + "destination_prefix_list_id": null, + "egress_only_gateway_id": null, + "local_gateway_id": null, + "nat_gateway_id": null, + "timeouts": { + "create": "5m", + "delete": null, + }, + "transit_gateway_id": null, + "vpc_endpoint_id": null, + "vpc_peering_connection_id": null, + }, + "destroy": false, + "diff": { + "carrier_gateway_id": { + "computed": false, + "new": "", + "old": "", + }, + "destination_cidr_block": { + "computed": false, + "new": "0.0.0.0/0", + "old": "", + }, + "destination_ipv6_cidr_block": { + "computed": false, + "new": "", + "old": "", + }, + "destination_prefix_list_id": { + "computed": false, + "new": "", + "old": "", + }, + "egress_only_gateway_id": { + "computed": false, + "new": "", + "old": "", + }, + "gateway_id": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "instance_id": { + "computed": true, + "new": "", + "old": "", + }, + "instance_owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "local_gateway_id": { + "computed": false, + "new": "", + "old": "", + }, + "nat_gateway_id": { + "computed": false, + "new": "", + "old": "", + }, + "network_interface_id": { + "computed": true, + "new": "", + "old": "", + }, + "origin": { + "computed": true, + "new": "", + "old": "", + }, + "route_table_id": { + "computed": true, + "new": "", + "old": "", + }, + "state": { + "computed": true, + "new": "", + "old": "", + }, + "timeouts.%": { + "computed": false, + "new": "2", + "old": "", + }, + "timeouts.create": { + "computed": false, + "new": "5m", + "old": "", + }, + "timeouts.delete": { + "computed": false, + "new": "", + "old": "", + }, + "transit_gateway_id": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_endpoint_id": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_peering_connection_id": { + "computed": false, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_route_table": { + "web_rtb": { + 0: { + "applied": { + "tags": { + "Name": "123456789123-acme-dev-rtb", + }, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "propagating_vgws.#": { + "computed": true, + "new": "", + "old": "", + }, + "route.#": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-rtb", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_route_table_association": { + "rtbassoc": { + 0: { + "applied": { + "gateway_id": null, + }, + "destroy": false, + "diff": { + "gateway_id": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "route_table_id": { + "computed": true, + "new": "", + "old": "", + }, + "subnet_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "rtbassoc2": { + 0: { + "applied": { + "gateway_id": null, + }, + "destroy": false, + "diff": { + "gateway_id": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "route_table_id": { + "computed": true, + "new": "", + "old": "", + }, + "subnet_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_s3_bucket": { + "data": { + 0: { + "applied": { + "acl": "public-read", + "bucket": "123456789123-acme-dev-data", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-data", + }, + "website": [], + }, + "destroy": false, + "diff": { + "acceleration_status": { + "computed": true, + "new": "", + "old": "", + }, + "acl": { + "computed": false, + "new": "public-read", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "bucket": { + "computed": false, + "new": "123456789123-acme-dev-data", + "old": "", + }, + "bucket_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "bucket_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "bucket_regional_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "cors_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "force_destroy": { + "computed": false, + "new": "true", + "old": "", + }, + "grant.#": { + "computed": false, + "new": "0", + "old": "", + }, + "hosted_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "lifecycle_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "logging.#": { + "computed": false, + "new": "0", + "old": "", + }, + "object_lock_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "policy": { + "computed": false, + "new": "", + "old": "", + }, + "region": { + "computed": true, + "new": "", + "old": "", + }, + "replication_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "request_payer": { + "computed": true, + "new": "", + "old": "", + }, + "server_side_encryption_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-data", + "old": "", + }, + "versioning.#": { + "computed": true, + "new": "", + "old": "", + }, + "website.#": { + "computed": false, + "new": "0", + "old": "", + }, + "website_domain": { + "computed": true, + "new": "", + "old": "", + }, + "website_endpoint": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "data_science": { + 0: { + "applied": { + "acl": "private", + "bucket": "123456789123-acme-dev-data-science", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [ + { + "target_prefix": "log/", + }, + ], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": null, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + "destroy": false, + "diff": { + "acceleration_status": { + "computed": true, + "new": "", + "old": "", + }, + "acl": { + "computed": false, + "new": "private", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "bucket": { + "computed": false, + "new": "123456789123-acme-dev-data-science", + "old": "", + }, + "bucket_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "bucket_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "bucket_regional_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "cors_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "force_destroy": { + "computed": false, + "new": "true", + "old": "", + }, + "grant.#": { + "computed": false, + "new": "0", + "old": "", + }, + "hosted_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "lifecycle_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "logging.#": { + "computed": false, + "new": "1", + "old": "", + }, + "logging.0.%": { + "computed": true, + "new": "", + "old": "", + }, + "logging.0.target_bucket": { + "computed": true, + "new": "", + "old": "", + }, + "logging.0.target_prefix": { + "computed": false, + "new": "log/", + "old": "", + }, + "object_lock_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "policy": { + "computed": false, + "new": "", + "old": "", + }, + "region": { + "computed": true, + "new": "", + "old": "", + }, + "replication_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "request_payer": { + "computed": true, + "new": "", + "old": "", + }, + "server_side_encryption_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "versioning.#": { + "computed": false, + "new": "1", + "old": "", + }, + "versioning.0.%": { + "computed": false, + "new": "2", + "old": "", + }, + "versioning.0.enabled": { + "computed": false, + "new": "true", + "old": "", + }, + "versioning.0.mfa_delete": { + "computed": false, + "new": "false", + "old": "", + }, + "website.#": { + "computed": false, + "new": "0", + "old": "", + }, + "website_domain": { + "computed": true, + "new": "", + "old": "", + }, + "website_endpoint": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "financials": { + 0: { + "applied": { + "acl": "private", + "bucket": "123456789123-acme-dev-financials", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-financials", + }, + "website": [], + }, + "destroy": false, + "diff": { + "acceleration_status": { + "computed": true, + "new": "", + "old": "", + }, + "acl": { + "computed": false, + "new": "private", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "bucket": { + "computed": false, + "new": "123456789123-acme-dev-financials", + "old": "", + }, + "bucket_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "bucket_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "bucket_regional_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "cors_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "force_destroy": { + "computed": false, + "new": "true", + "old": "", + }, + "grant.#": { + "computed": false, + "new": "0", + "old": "", + }, + "hosted_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "lifecycle_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "logging.#": { + "computed": false, + "new": "0", + "old": "", + }, + "object_lock_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "policy": { + "computed": false, + "new": "", + "old": "", + }, + "region": { + "computed": true, + "new": "", + "old": "", + }, + "replication_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "request_payer": { + "computed": true, + "new": "", + "old": "", + }, + "server_side_encryption_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-financials", + "old": "", + }, + "versioning.#": { + "computed": true, + "new": "", + "old": "", + }, + "website.#": { + "computed": false, + "new": "0", + "old": "", + }, + "website_domain": { + "computed": true, + "new": "", + "old": "", + }, + "website_endpoint": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "flowbucket": { + 0: { + "applied": { + "acl": "private", + "bucket": "123456789123-acme-dev-flowlogs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs", + }, + "website": [], + }, + "destroy": false, + "diff": { + "acceleration_status": { + "computed": true, + "new": "", + "old": "", + }, + "acl": { + "computed": false, + "new": "private", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "bucket": { + "computed": false, + "new": "123456789123-acme-dev-flowlogs", + "old": "", + }, + "bucket_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "bucket_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "bucket_regional_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "cors_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "force_destroy": { + "computed": false, + "new": "true", + "old": "", + }, + "grant.#": { + "computed": false, + "new": "0", + "old": "", + }, + "hosted_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "lifecycle_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "logging.#": { + "computed": false, + "new": "0", + "old": "", + }, + "object_lock_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "policy": { + "computed": false, + "new": "", + "old": "", + }, + "region": { + "computed": true, + "new": "", + "old": "", + }, + "replication_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "request_payer": { + "computed": true, + "new": "", + "old": "", + }, + "server_side_encryption_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-flowlogs", + "old": "", + }, + "versioning.#": { + "computed": true, + "new": "", + "old": "", + }, + "website.#": { + "computed": false, + "new": "0", + "old": "", + }, + "website_domain": { + "computed": true, + "new": "", + "old": "", + }, + "website_endpoint": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "logs": { + 0: { + "applied": { + "acl": "log-delivery-write", + "bucket": "123456789123-acme-dev-logs", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "sse_algorithm": "aws:kms", + }, + ], + "bucket_key_enabled": null, + }, + ], + }, + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-logs", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + "destroy": false, + "diff": { + "acceleration_status": { + "computed": true, + "new": "", + "old": "", + }, + "acl": { + "computed": false, + "new": "log-delivery-write", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "bucket": { + "computed": false, + "new": "123456789123-acme-dev-logs", + "old": "", + }, + "bucket_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "bucket_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "bucket_regional_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "cors_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "force_destroy": { + "computed": false, + "new": "true", + "old": "", + }, + "grant.#": { + "computed": false, + "new": "0", + "old": "", + }, + "hosted_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "lifecycle_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "logging.#": { + "computed": false, + "new": "0", + "old": "", + }, + "object_lock_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "policy": { + "computed": false, + "new": "", + "old": "", + }, + "region": { + "computed": true, + "new": "", + "old": "", + }, + "replication_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "request_payer": { + "computed": true, + "new": "", + "old": "", + }, + "server_side_encryption_configuration.#": { + "computed": false, + "new": "1", + "old": "", + }, + "server_side_encryption_configuration.0.%": { + "computed": false, + "new": "1", + "old": "", + }, + "server_side_encryption_configuration.0.rule.#": { + "computed": false, + "new": "1", + "old": "", + }, + "server_side_encryption_configuration.0.rule.0.%": { + "computed": false, + "new": "2", + "old": "", + }, + "server_side_encryption_configuration.0.rule.0.apply_server_side_encryption_by_default.#": { + "computed": false, + "new": "1", + "old": "", + }, + "server_side_encryption_configuration.0.rule.0.apply_server_side_encryption_by_default.0.%": { + "computed": true, + "new": "", + "old": "", + }, + "server_side_encryption_configuration.0.rule.0.apply_server_side_encryption_by_default.0.kms_master_key_id": { + "computed": true, + "new": "", + "old": "", + }, + "server_side_encryption_configuration.0.rule.0.apply_server_side_encryption_by_default.0.sse_algorithm": { + "computed": false, + "new": "aws:kms", + "old": "", + }, + "server_side_encryption_configuration.0.rule.0.bucket_key_enabled": { + "computed": false, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-logs", + "old": "", + }, + "versioning.#": { + "computed": false, + "new": "1", + "old": "", + }, + "versioning.0.%": { + "computed": false, + "new": "2", + "old": "", + }, + "versioning.0.enabled": { + "computed": false, + "new": "true", + "old": "", + }, + "versioning.0.mfa_delete": { + "computed": false, + "new": "false", + "old": "", + }, + "website.#": { + "computed": false, + "new": "0", + "old": "", + }, + "website_domain": { + "computed": true, + "new": "", + "old": "", + }, + "website_endpoint": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "operations": { + 0: { + "applied": { + "acl": "private", + "bucket": "123456789123-acme-dev-operations", + "bucket_prefix": null, + "cors_rule": [], + "force_destroy": true, + "grant": [], + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "replication_configuration": [], + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-operations", + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false, + }, + ], + "website": [], + }, + "destroy": false, + "diff": { + "acceleration_status": { + "computed": true, + "new": "", + "old": "", + }, + "acl": { + "computed": false, + "new": "private", + "old": "", + }, + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "bucket": { + "computed": false, + "new": "123456789123-acme-dev-operations", + "old": "", + }, + "bucket_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "bucket_prefix": { + "computed": false, + "new": "", + "old": "", + }, + "bucket_regional_domain_name": { + "computed": true, + "new": "", + "old": "", + }, + "cors_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "force_destroy": { + "computed": false, + "new": "true", + "old": "", + }, + "grant.#": { + "computed": false, + "new": "0", + "old": "", + }, + "hosted_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "lifecycle_rule.#": { + "computed": false, + "new": "0", + "old": "", + }, + "logging.#": { + "computed": false, + "new": "0", + "old": "", + }, + "object_lock_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "policy": { + "computed": false, + "new": "", + "old": "", + }, + "region": { + "computed": true, + "new": "", + "old": "", + }, + "replication_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "request_payer": { + "computed": true, + "new": "", + "old": "", + }, + "server_side_encryption_configuration.#": { + "computed": false, + "new": "0", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-operations", + "old": "", + }, + "versioning.#": { + "computed": false, + "new": "1", + "old": "", + }, + "versioning.0.%": { + "computed": false, + "new": "2", + "old": "", + }, + "versioning.0.enabled": { + "computed": false, + "new": "true", + "old": "", + }, + "versioning.0.mfa_delete": { + "computed": false, + "new": "false", + "old": "", + }, + "website.#": { + "computed": false, + "new": "0", + "old": "", + }, + "website_domain": { + "computed": true, + "new": "", + "old": "", + }, + "website_endpoint": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_s3_bucket_object": { + "data_object": { + 0: { + "applied": { + "acl": "private", + "cache_control": null, + "content": null, + "content_base64": null, + "content_disposition": null, + "content_encoding": null, + "content_language": null, + "force_destroy": false, + "key": "customer-master.xlsx", + "metadata": null, + "object_lock_legal_hold_status": null, + "object_lock_mode": null, + "object_lock_retain_until_date": null, + "source": "resources/customer-master.xlsx", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-customer-master", + }, + "website_redirect": null, + }, + "destroy": false, + "diff": { + "acl": { + "computed": false, + "new": "private", + "old": "", + }, + "bucket": { + "computed": true, + "new": "", + "old": "", + }, + "bucket_key_enabled": { + "computed": true, + "new": "", + "old": "", + }, + "cache_control": { + "computed": false, + "new": "", + "old": "", + }, + "content": { + "computed": false, + "new": "", + "old": "", + }, + "content_base64": { + "computed": false, + "new": "", + "old": "", + }, + "content_disposition": { + "computed": false, + "new": "", + "old": "", + }, + "content_encoding": { + "computed": false, + "new": "", + "old": "", + }, + "content_language": { + "computed": false, + "new": "", + "old": "", + }, + "content_type": { + "computed": true, + "new": "", + "old": "", + }, + "etag": { + "computed": true, + "new": "", + "old": "", + }, + "force_destroy": { + "computed": false, + "new": "false", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "key": { + "computed": false, + "new": "customer-master.xlsx", + "old": "", + }, + "kms_key_id": { + "computed": true, + "new": "", + "old": "", + }, + "metadata": { + "computed": false, + "new": "", + "old": "", + }, + "object_lock_legal_hold_status": { + "computed": false, + "new": "", + "old": "", + }, + "object_lock_mode": { + "computed": false, + "new": "", + "old": "", + }, + "object_lock_retain_until_date": { + "computed": false, + "new": "", + "old": "", + }, + "server_side_encryption": { + "computed": true, + "new": "", + "old": "", + }, + "source": { + "computed": false, + "new": "resources/customer-master.xlsx", + "old": "", + }, + "storage_class": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-customer-master", + "old": "", + }, + "version_id": { + "computed": true, + "new": "", + "old": "", + }, + "website_redirect": { + "computed": false, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_security_group": { + "default": { + 0: { + "applied": { + "description": "Managed by Terraform", + "name": "123456789123-acme-dev-rds-sg", + "revoke_rules_on_delete": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds-sg", + }, + "timeouts": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "description": { + "computed": false, + "new": "Managed by Terraform", + "old": "", + }, + "egress.#": { + "computed": true, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "ingress.#": { + "computed": true, + "new": "", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-rds-sg", + "old": "", + }, + "name_prefix": { + "computed": true, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "revoke_rules_on_delete": { + "computed": false, + "new": "false", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Environment": { + "computed": false, + "new": "123456789123-acme-dev", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-rds-sg", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "web-node": { + 0: { + "applied": { + "description": "123456789123-acme-dev Security Group", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0, + }, + ], + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 22, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 22, + }, + { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": "", + "from_port": 80, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 80, + }, + ], + "name": "123456789123-acme-dev-sg", + "revoke_rules_on_delete": false, + "tags": null, + "timeouts": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "description": { + "computed": false, + "new": "123456789123-acme-dev Security Group", + "old": "", + }, + "egress.#": { + "computed": false, + "new": "1", + "old": "", + }, + "egress.0.%": { + "computed": false, + "new": "9", + "old": "", + }, + "egress.0.cidr_blocks.#": { + "computed": false, + "new": "1", + "old": "", + }, + "egress.0.cidr_blocks.0": { + "computed": false, + "new": "0.0.0.0/0", + "old": "", + }, + "egress.0.description": { + "computed": false, + "new": "", + "old": "", + }, + "egress.0.from_port": { + "computed": false, + "new": "0", + "old": "", + }, + "egress.0.ipv6_cidr_blocks.#": { + "computed": false, + "new": "0", + "old": "", + }, + "egress.0.prefix_list_ids.#": { + "computed": false, + "new": "0", + "old": "", + }, + "egress.0.protocol": { + "computed": false, + "new": "-1", + "old": "", + }, + "egress.0.security_groups.#": { + "computed": false, + "new": "0", + "old": "", + }, + "egress.0.self": { + "computed": false, + "new": "false", + "old": "", + }, + "egress.0.to_port": { + "computed": false, + "new": "0", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "ingress.#": { + "computed": false, + "new": "2", + "old": "", + }, + "ingress.0.%": { + "computed": false, + "new": "9", + "old": "", + }, + "ingress.0.cidr_blocks.#": { + "computed": false, + "new": "1", + "old": "", + }, + "ingress.0.cidr_blocks.0": { + "computed": false, + "new": "0.0.0.0/0", + "old": "", + }, + "ingress.0.description": { + "computed": false, + "new": "", + "old": "", + }, + "ingress.0.from_port": { + "computed": false, + "new": "22", + "old": "", + }, + "ingress.0.ipv6_cidr_blocks.#": { + "computed": false, + "new": "0", + "old": "", + }, + "ingress.0.prefix_list_ids.#": { + "computed": false, + "new": "0", + "old": "", + }, + "ingress.0.protocol": { + "computed": false, + "new": "tcp", + "old": "", + }, + "ingress.0.security_groups.#": { + "computed": false, + "new": "0", + "old": "", + }, + "ingress.0.self": { + "computed": false, + "new": "false", + "old": "", + }, + "ingress.0.to_port": { + "computed": false, + "new": "22", + "old": "", + }, + "ingress.1.%": { + "computed": false, + "new": "9", + "old": "", + }, + "ingress.1.cidr_blocks.#": { + "computed": false, + "new": "1", + "old": "", + }, + "ingress.1.cidr_blocks.0": { + "computed": false, + "new": "0.0.0.0/0", + "old": "", + }, + "ingress.1.description": { + "computed": false, + "new": "", + "old": "", + }, + "ingress.1.from_port": { + "computed": false, + "new": "80", + "old": "", + }, + "ingress.1.ipv6_cidr_blocks.#": { + "computed": false, + "new": "0", + "old": "", + }, + "ingress.1.prefix_list_ids.#": { + "computed": false, + "new": "0", + "old": "", + }, + "ingress.1.protocol": { + "computed": false, + "new": "tcp", + "old": "", + }, + "ingress.1.security_groups.#": { + "computed": false, + "new": "0", + "old": "", + }, + "ingress.1.self": { + "computed": false, + "new": "false", + "old": "", + }, + "ingress.1.to_port": { + "computed": false, + "new": "80", + "old": "", + }, + "name": { + "computed": false, + "new": "123456789123-acme-dev-sg", + "old": "", + }, + "name_prefix": { + "computed": true, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "revoke_rules_on_delete": { + "computed": false, + "new": "false", + "old": "", + }, + "tags": { + "computed": false, + "new": "", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_security_group_rule": { + "egress": { + 0: { + "applied": { + "cidr_blocks": [ + "0.0.0.0/0", + ], + "description": null, + "from_port": 0, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "-1", + "self": false, + "to_port": 0, + "type": "egress", + }, + "destroy": false, + "diff": { + "cidr_blocks.#": { + "computed": false, + "new": "1", + "old": "", + }, + "cidr_blocks.0": { + "computed": false, + "new": "0.0.0.0/0", + "old": "", + }, + "description": { + "computed": false, + "new": "", + "old": "", + }, + "from_port": { + "computed": false, + "new": "0", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_cidr_blocks": { + "computed": false, + "new": "", + "old": "", + }, + "prefix_list_ids": { + "computed": false, + "new": "", + "old": "", + }, + "protocol": { + "computed": false, + "new": "-1", + "old": "", + }, + "security_group_id": { + "computed": true, + "new": "", + "old": "", + }, + "self": { + "computed": false, + "new": "false", + "old": "", + }, + "source_security_group_id": { + "computed": true, + "new": "", + "old": "", + }, + "to_port": { + "computed": false, + "new": "0", + "old": "", + }, + "type": { + "computed": false, + "new": "egress", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "ingress": { + 0: { + "applied": { + "cidr_blocks": [ + "172.16.0.0/16", + ], + "description": null, + "from_port": 3306, + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "tcp", + "self": false, + "to_port": 3306, + "type": "ingress", + }, + "destroy": false, + "diff": { + "cidr_blocks.#": { + "computed": false, + "new": "1", + "old": "", + }, + "cidr_blocks.0": { + "computed": false, + "new": "172.16.0.0/16", + "old": "", + }, + "description": { + "computed": false, + "new": "", + "old": "", + }, + "from_port": { + "computed": false, + "new": "3306", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_cidr_blocks": { + "computed": false, + "new": "", + "old": "", + }, + "prefix_list_ids": { + "computed": false, + "new": "", + "old": "", + }, + "protocol": { + "computed": false, + "new": "tcp", + "old": "", + }, + "security_group_id": { + "computed": true, + "new": "", + "old": "", + }, + "self": { + "computed": false, + "new": "false", + "old": "", + }, + "source_security_group_id": { + "computed": true, + "new": "", + "old": "", + }, + "to_port": { + "computed": false, + "new": "3306", + "old": "", + }, + "type": { + "computed": false, + "new": "ingress", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_subnet": { + "eks_subnet1": { + 0: { + "applied": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "10.10.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "assign_ipv6_address_on_creation": { + "computed": false, + "new": "false", + "old": "", + }, + "availability_zone": { + "computed": false, + "new": "us-west-2a", + "old": "", + }, + "availability_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "cidr_block": { + "computed": false, + "new": "10.10.10.0/24", + "old": "", + }, + "customer_owned_ipv4_pool": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_cidr_block": { + "computed": false, + "new": "", + "old": "", + }, + "ipv6_cidr_block_association_id": { + "computed": true, + "new": "", + "old": "", + }, + "map_customer_owned_ip_on_launch": { + "computed": false, + "new": "", + "old": "", + }, + "map_public_ip_on_launch": { + "computed": false, + "new": "true", + "old": "", + }, + "outpost_arn": { + "computed": false, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-eks-subnet", + "old": "", + }, + "tags.kubernetes.io/cluster/123456789123-acme-dev-eks": { + "computed": false, + "new": "shared", + "old": "", + }, + "tags_all.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags_all.Name": { + "computed": false, + "new": "123456789123-acme-dev-eks-subnet", + "old": "", + }, + "tags_all.kubernetes.io/cluster/123456789123-acme-dev-eks": { + "computed": false, + "new": "shared", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "eks_subnet2": { + 0: { + "applied": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "10.10.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-subnet2", + "kubernetes.io/cluster/123456789123-acme-dev-eks": "shared", + }, + "timeouts": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "assign_ipv6_address_on_creation": { + "computed": false, + "new": "false", + "old": "", + }, + "availability_zone": { + "computed": false, + "new": "us-west-2b", + "old": "", + }, + "availability_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "cidr_block": { + "computed": false, + "new": "10.10.11.0/24", + "old": "", + }, + "customer_owned_ipv4_pool": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_cidr_block": { + "computed": false, + "new": "", + "old": "", + }, + "ipv6_cidr_block_association_id": { + "computed": true, + "new": "", + "old": "", + }, + "map_customer_owned_ip_on_launch": { + "computed": false, + "new": "", + "old": "", + }, + "map_public_ip_on_launch": { + "computed": false, + "new": "true", + "old": "", + }, + "outpost_arn": { + "computed": false, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-eks-subnet2", + "old": "", + }, + "tags.kubernetes.io/cluster/123456789123-acme-dev-eks": { + "computed": false, + "new": "shared", + "old": "", + }, + "tags_all.%": { + "computed": false, + "new": "2", + "old": "", + }, + "tags_all.Name": { + "computed": false, + "new": "123456789123-acme-dev-eks-subnet2", + "old": "", + }, + "tags_all.kubernetes.io/cluster/123456789123-acme-dev-eks": { + "computed": false, + "new": "shared", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "web_subnet": { + 0: { + "applied": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "cidr_block": "172.16.10.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet", + }, + "timeouts": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "assign_ipv6_address_on_creation": { + "computed": false, + "new": "false", + "old": "", + }, + "availability_zone": { + "computed": false, + "new": "us-west-2a", + "old": "", + }, + "availability_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "cidr_block": { + "computed": false, + "new": "172.16.10.0/24", + "old": "", + }, + "customer_owned_ipv4_pool": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_cidr_block": { + "computed": false, + "new": "", + "old": "", + }, + "ipv6_cidr_block_association_id": { + "computed": true, + "new": "", + "old": "", + }, + "map_customer_owned_ip_on_launch": { + "computed": false, + "new": "", + "old": "", + }, + "map_public_ip_on_launch": { + "computed": false, + "new": "true", + "old": "", + }, + "outpost_arn": { + "computed": false, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-subnet", + "old": "", + }, + "tags_all.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags_all.Name": { + "computed": false, + "new": "123456789123-acme-dev-subnet", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "web_subnet2": { + 0: { + "applied": { + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "cidr_block": "172.16.11.0/24", + "customer_owned_ipv4_pool": null, + "ipv6_cidr_block": null, + "map_customer_owned_ip_on_launch": null, + "map_public_ip_on_launch": true, + "outpost_arn": null, + "tags": { + "Name": "123456789123-acme-dev-subnet2", + }, + "tags_all": { + "Name": "123456789123-acme-dev-subnet2", + }, + "timeouts": null, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "assign_ipv6_address_on_creation": { + "computed": false, + "new": "false", + "old": "", + }, + "availability_zone": { + "computed": false, + "new": "us-west-2b", + "old": "", + }, + "availability_zone_id": { + "computed": true, + "new": "", + "old": "", + }, + "cidr_block": { + "computed": false, + "new": "172.16.11.0/24", + "old": "", + }, + "customer_owned_ipv4_pool": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_cidr_block": { + "computed": false, + "new": "", + "old": "", + }, + "ipv6_cidr_block_association_id": { + "computed": true, + "new": "", + "old": "", + }, + "map_customer_owned_ip_on_launch": { + "computed": false, + "new": "", + "old": "", + }, + "map_public_ip_on_launch": { + "computed": false, + "new": "true", + "old": "", + }, + "outpost_arn": { + "computed": false, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-subnet2", + "old": "", + }, + "tags_all.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags_all.Name": { + "computed": false, + "new": "123456789123-acme-dev-subnet2", + "old": "", + }, + "timeouts": { + "computed": false, + "new": "", + "old": "", + }, + "vpc_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_volume_attachment": { + "ebs_att": { + 0: { + "applied": { + "device_name": "/dev/sdh", + "force_detach": null, + "skip_destroy": null, + }, + "destroy": false, + "diff": { + "device_name": { + "computed": false, + "new": "/dev/sdh", + "old": "", + }, + "force_detach": { + "computed": false, + "new": "", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "instance_id": { + "computed": true, + "new": "", + "old": "", + }, + "skip_destroy": { + "computed": false, + "new": "", + "old": "", + }, + "volume_id": { + "computed": true, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "aws_vpc": { + "eks_vpc": { + 0: { + "applied": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.10.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-vpc", + }, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "assign_generated_ipv6_cidr_block": { + "computed": false, + "new": "false", + "old": "", + }, + "cidr_block": { + "computed": false, + "new": "10.10.0.0/16", + "old": "", + }, + "default_network_acl_id": { + "computed": true, + "new": "", + "old": "", + }, + "default_route_table_id": { + "computed": true, + "new": "", + "old": "", + }, + "default_security_group_id": { + "computed": true, + "new": "", + "old": "", + }, + "dhcp_options_id": { + "computed": true, + "new": "", + "old": "", + }, + "enable_classiclink": { + "computed": true, + "new": "", + "old": "", + }, + "enable_classiclink_dns_support": { + "computed": true, + "new": "", + "old": "", + }, + "enable_dns_hostnames": { + "computed": false, + "new": "true", + "old": "", + }, + "enable_dns_support": { + "computed": false, + "new": "true", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "instance_tenancy": { + "computed": false, + "new": "default", + "old": "", + }, + "ipv6_association_id": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_cidr_block": { + "computed": true, + "new": "", + "old": "", + }, + "main_route_table_id": { + "computed": true, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-eks-vpc", + "old": "", + }, + "tags_all.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags_all.Name": { + "computed": false, + "new": "123456789123-acme-dev-eks-vpc", + "old": "", + }, + }, + "requires_new": false, + }, + }, + "web_vpc": { + 0: { + "applied": { + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "172.16.0.0/16", + "enable_dns_hostnames": true, + "enable_dns_support": true, + "instance_tenancy": "default", + "tags": { + "Name": "123456789123-acme-dev-vpc", + }, + "tags_all": { + "Name": "123456789123-acme-dev-vpc", + }, + }, + "destroy": false, + "diff": { + "arn": { + "computed": true, + "new": "", + "old": "", + }, + "assign_generated_ipv6_cidr_block": { + "computed": false, + "new": "false", + "old": "", + }, + "cidr_block": { + "computed": false, + "new": "172.16.0.0/16", + "old": "", + }, + "default_network_acl_id": { + "computed": true, + "new": "", + "old": "", + }, + "default_route_table_id": { + "computed": true, + "new": "", + "old": "", + }, + "default_security_group_id": { + "computed": true, + "new": "", + "old": "", + }, + "dhcp_options_id": { + "computed": true, + "new": "", + "old": "", + }, + "enable_classiclink": { + "computed": true, + "new": "", + "old": "", + }, + "enable_classiclink_dns_support": { + "computed": true, + "new": "", + "old": "", + }, + "enable_dns_hostnames": { + "computed": false, + "new": "true", + "old": "", + }, + "enable_dns_support": { + "computed": false, + "new": "true", + "old": "", + }, + "id": { + "computed": true, + "new": "", + "old": "", + }, + "instance_tenancy": { + "computed": false, + "new": "default", + "old": "", + }, + "ipv6_association_id": { + "computed": true, + "new": "", + "old": "", + }, + "ipv6_cidr_block": { + "computed": true, + "new": "", + "old": "", + }, + "main_route_table_id": { + "computed": true, + "new": "", + "old": "", + }, + "owner_id": { + "computed": true, + "new": "", + "old": "", + }, + "tags.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags.Name": { + "computed": false, + "new": "123456789123-acme-dev-vpc", + "old": "", + }, + "tags_all.%": { + "computed": false, + "new": "1", + "old": "", + }, + "tags_all.Name": { + "computed": false, + "new": "123456789123-acme-dev-vpc", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + "null_resource": { + "push_image": { + 0: { + "applied": { + "triggers": null, + }, + "destroy": false, + "diff": { + "id": { + "computed": true, + "new": "", + "old": "", + }, + "triggers": { + "computed": false, + "new": "", + "old": "", + }, + }, + "requires_new": false, + }, + }, + }, + }, + }, +} + +module_paths = [ + [], +] + +terraform_version = "0.14.7" + +variables = { + "ami": "ami-09a5b0b7edf08843d", + "availability_zone": "us-west-2a", + "availability_zone2": "us-west-2b", + "company_name": "acme", + "dbname": "db1", + "environment": "dev", + "neptune-dbname": "neptunedb1", + "password": "Aa1234321Bb", + "profile": "default", + "region": "us-west-2", +} + +module = func(path) { + if types.type_of(path) is not "list" { + error("expected list, got", types.type_of(path)) + } + + if length(path) < 1 { + return _modules.root + } + + addr = [] + for path as p { + append(addr, "module") + append(addr, p) + } + + return _modules[strings.join(addr, ".")] +} + +data = _modules.root.data +path = _modules.root.path +resources = _modules.root.resources diff --git a/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfrun.sentinel b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfrun.sentinel new file mode 100644 index 0000000..fb60c9b --- /dev/null +++ b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfrun.sentinel @@ -0,0 +1,38 @@ +id = "run-dZrrVZJeZDuBBDzu" +created_at = "2021-04-24T19:36:28.501Z" +message = "Queued manually using Terraform" +commit_sha = undefined +speculative = false +is_destroy = false +target_addrs = null + +variables = { + "AWS_ACCESS_KEY_ID": { + "category": "terraform", + "sensitive": false, + }, + "AWS_SECRET_ACCESS_KEY": { + "category": "terraform", + "sensitive": true, + }, +} + +organization = { + "name": "X", +} + +workspace = { + "auto_apply": false, + "created_at": "2021-04-24T19:14:32.703Z", + "description": null, + "id": "ws-yXFrJ7NgCSCdTfCb", + "name": "Workspace", + "vcs_repo": null, + "working_directory": "", +} + +cost_estimate = { + "delta_monthly_cost": "71.66200000000000248", + "prior_monthly_cost": "0.0", + "proposed_monthly_cost": "71.66200000000000248", +} diff --git a/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfstate-v2.sentinel b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfstate-v2.sentinel new file mode 100644 index 0000000..9620e32 --- /dev/null +++ b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfstate-v2.sentinel @@ -0,0 +1,201 @@ +terraform_version = "0.14.7" + +outputs = { + "username": { + "name": "username", + "sensitive": false, + "value": "123456789123-acme-dev-user", + }, +} + +resources = { + "aws_ami.amazon-linux-2": { + "address": "aws_ami.amazon-linux-2", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "data", + "module_address": "", + "name": "amazon-linux-2", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_ami", + "values": { + "architecture": "x86_64", + "arn": "arn:aws:ec2:us-west-1::image/ami-06d584c1805ad64fb", + "block_device_mappings": [ + { + "device_name": "/dev/xvda", + "ebs": { + "delete_on_termination": "true", + "encrypted": "false", + "iops": "0", + "snapshot_id": "snap-0fbf7b35b6f00249f", + "throughput": "0", + "volume_size": "8", + "volume_type": "standard", + }, + "no_device": "", + "virtual_name": "", + }, + ], + "creation_date": "2021-03-26T23:02:09.000Z", + "description": "Amazon Linux 2 AMI 2.0.20210326.0 x86_64 HVM ebs", + "ena_support": true, + "executable_users": null, + "filter": [ + { + "name": "name", + "values": [ + "amzn2-ami-hvm-*-x86_64-ebs", + ], + }, + { + "name": "owner-alias", + "values": [ + "amazon", + ], + }, + ], + "hypervisor": "xen", + "id": "ami-06d584c1805ad64fb", + "image_id": "ami-06d584c1805ad64fb", + "image_location": "amazon/amzn2-ami-hvm-2.0.20210326.0-x86_64-ebs", + "image_owner_alias": "amazon", + "image_type": "machine", + "kernel_id": null, + "most_recent": true, + "name": "amzn2-ami-hvm-2.0.20210326.0-x86_64-ebs", + "name_regex": null, + "owner_id": "137112412989", + "owners": [ + "amazon", + ], + "platform": null, + "platform_details": "Linux/UNIX", + "product_codes": [], + "public": true, + "ramdisk_id": null, + "root_device_name": "/dev/xvda", + "root_device_type": "ebs", + "root_snapshot_id": "snap-0fbf7b35b6f00249f", + "sriov_net_support": "simple", + "state": "available", + "state_reason": { + "code": "UNSET", + "message": "UNSET", + }, + "tags": {}, + "usage_operation": "RunInstances", + "virtualization_type": "hvm", + }, + }, + "aws_caller_identity.current": { + "address": "aws_caller_identity.current", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "data", + "module_address": "", + "name": "current", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_caller_identity", + "values": { + "account_id": "123456789123", + "arn": "arn:aws:iam::123456789123:user/terraform-test", + "id": "123456789123", + "user_id": "AIDAT7X67JOMQS4DRTZRE", + }, + }, + "aws_iam_policy_document.iam_policy_eks": { + "address": "aws_iam_policy_document.iam_policy_eks", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "data", + "module_address": "", + "name": "iam_policy_eks", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_policy_document", + "values": { + "id": "189502314", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "sts:AssumeRole", + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "eks.amazonaws.com", + ], + "type": "Service", + }, + ], + "resources": [], + "sid": "", + }, + ], + "version": "2012-10-17", + }, + }, + "aws_iam_policy_document.policy": { + "address": "aws_iam_policy_document.policy", + "depends_on": [], + "deposed_key": "", + "index": null, + "mode": "data", + "module_address": "", + "name": "policy", + "provider_name": "registry.terraform.io/hashicorp/aws", + "tainted": false, + "type": "aws_iam_policy_document", + "values": { + "id": "3931805674", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "es:*", + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "*", + ], + "type": "AWS", + }, + ], + "resources": [ + "*", + ], + "sid": "", + }, + ], + "version": "2012-10-17", + }, + }, +} diff --git a/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfstate.sentinel b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfstate.sentinel new file mode 100644 index 0000000..f55daff --- /dev/null +++ b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/mock-tfstate.sentinel @@ -0,0 +1,222 @@ +import "strings" +import "types" + +outputs = { + "username": { + "sensitive": false, + "type": "string", + "value": "123456789123-acme-dev-user", + }, +} + +_modules = { + "root": { + "data": { + "aws_ami": { + "amazon-linux-2": { + 0: { + "attr": { + "architecture": "x86_64", + "arn": "arn:aws:ec2:us-west-1::image/ami-06d584c1805ad64fb", + "block_device_mappings": [ + { + "device_name": "/dev/xvda", + "ebs": { + "delete_on_termination": "true", + "encrypted": "false", + "iops": "0", + "snapshot_id": "snap-0fbf7b35b6f00249f", + "throughput": "0", + "volume_size": "8", + "volume_type": "standard", + }, + "no_device": "", + "virtual_name": "", + }, + ], + "creation_date": "2021-03-26T23:02:09.000Z", + "description": "Amazon Linux 2 AMI 2.0.20210326.0 x86_64 HVM ebs", + "ena_support": true, + "executable_users": null, + "filter": [ + { + "name": "name", + "values": [ + "amzn2-ami-hvm-*-x86_64-ebs", + ], + }, + { + "name": "owner-alias", + "values": [ + "amazon", + ], + }, + ], + "hypervisor": "xen", + "id": "ami-06d584c1805ad64fb", + "image_id": "ami-06d584c1805ad64fb", + "image_location": "amazon/amzn2-ami-hvm-2.0.20210326.0-x86_64-ebs", + "image_owner_alias": "amazon", + "image_type": "machine", + "kernel_id": null, + "most_recent": true, + "name": "amzn2-ami-hvm-2.0.20210326.0-x86_64-ebs", + "name_regex": null, + "owner_id": "137112412989", + "owners": [ + "amazon", + ], + "platform": null, + "platform_details": "Linux/UNIX", + "product_codes": [], + "public": true, + "ramdisk_id": null, + "root_device_name": "/dev/xvda", + "root_device_type": "ebs", + "root_snapshot_id": "snap-0fbf7b35b6f00249f", + "sriov_net_support": "simple", + "state": "available", + "state_reason": { + "code": "UNSET", + "message": "UNSET", + }, + "tags": {}, + "usage_operation": "RunInstances", + "virtualization_type": "hvm", + }, + "depends_on": [], + "id": "ami-06d584c1805ad64fb", + "tainted": false, + }, + }, + }, + "aws_caller_identity": { + "current": { + 0: { + "attr": { + "account_id": "123456789123", + "arn": "arn:aws:iam::123456789123:user/terraform-test", + "id": "123456789123", + "user_id": "AIDAT7X67JOMQS4DRTZRE", + }, + "depends_on": [], + "id": "123456789123", + "tainted": false, + }, + }, + }, + "aws_iam_policy_document": { + "iam_policy_eks": { + 0: { + "attr": { + "id": "189502314", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "sts:AssumeRole", + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "eks.amazonaws.com", + ], + "type": "Service", + }, + ], + "resources": [], + "sid": "", + }, + ], + "version": "2012-10-17", + }, + "depends_on": [], + "id": "189502314", + "tainted": false, + }, + }, + "policy": { + 0: { + "attr": { + "id": "3931805674", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "es:*", + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "*", + ], + "type": "AWS", + }, + ], + "resources": [ + "*", + ], + "sid": "", + }, + ], + "version": "2012-10-17", + }, + "depends_on": [], + "id": "3931805674", + "tainted": false, + }, + }, + }, + }, + "path": [], + "resources": {}, + }, +} + +module_paths = [ + [], +] + +terraform_version = "0.14.7" + +module = func(path) { + if types.type_of(path) is not "list" { + error("expected list, got", types.type_of(path)) + } + + if length(path) < 1 { + return _modules.root + } + + addr = [] + for path as p { + append(addr, "module") + append(addr, p) + } + + return _modules[strings.join(addr, ".")] +} + +data = _modules.root.data +path = _modules.root.path +resources = _modules.root.resources diff --git a/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/sentinel.json b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/sentinel.json new file mode 100644 index 0000000..e48c65f --- /dev/null +++ b/sample-data/terraform-terragoat-aws-tfstate-sentinel-mocks/sentinel.json @@ -0,0 +1,14 @@ +{ + "mock": { + "tfconfig": "mock-tfconfig.sentinel", + "tfconfig/v1": "mock-tfconfig.sentinel", + "tfconfig/v2": "mock-tfconfig-v2.sentinel", + "tfplan": "mock-tfplan.sentinel", + "tfplan/v1": "mock-tfplan.sentinel", + "tfplan/v2": "mock-tfplan-v2.sentinel", + "tfrun": "mock-tfrun.sentinel", + "tfstate": "mock-tfstate.sentinel", + "tfstate/v1": "mock-tfstate.sentinel", + "tfstate/v2": "mock-tfstate-v2.sentinel" + } +} \ No newline at end of file diff --git a/sample-data/terraform-terragoat-aws.tfstate b/sample-data/terraform-terragoat-aws.tfstate new file mode 100644 index 0000000..e7ae0cb --- /dev/null +++ b/sample-data/terraform-terragoat-aws.tfstate @@ -0,0 +1,1821 @@ +{ + "version": 4, + "terraform_version": "0.14.3", + "serial": 0, + "lineage": "1321d7b7-cff6-52dc-a448-7b79bb5220cb", + "outputs": { + "username": { + "value": "123456789123-acme-dev-user", + "type": "string" + }, + "vpc_id": { + "value": "vpc-0298053d746216f7f", + "type": "string" + } + }, + "resources": [ + { + "mode": "data", + "type": "aws_ami", + "name": "amazon-linux-2", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "architecture": "x86_64", + "arn": "arn:aws:ec2:us-west-1::image/ami-06d584c1805ad64fb", + "block_device_mappings": [ + { + "device_name": "/dev/xvda", + "ebs": { + "delete_on_termination": "true", + "encrypted": "false", + "iops": "0", + "snapshot_id": "snap-0fbf7b35b6f00249f", + "throughput": "0", + "volume_size": "8", + "volume_type": "standard" + }, + "no_device": "", + "virtual_name": "" + } + ], + "creation_date": "2021-03-26T23:02:09.000Z", + "description": "Amazon Linux 2 AMI 2.0.20210326.0 x86_64 HVM ebs", + "ena_support": true, + "executable_users": null, + "filter": [ + { + "name": "name", + "values": [ + "amzn2-ami-hvm-*-x86_64-ebs" + ] + }, + { + "name": "owner-alias", + "values": [ + "amazon" + ] + } + ], + "hypervisor": "xen", + "id": "ami-06d584c1805ad64fb", + "image_id": "ami-06d584c1805ad64fb", + "image_location": "amazon/amzn2-ami-hvm-2.0.20210326.0-x86_64-ebs", + "image_owner_alias": "amazon", + "image_type": "machine", + "kernel_id": null, + "most_recent": true, + "name": "amzn2-ami-hvm-2.0.20210326.0-x86_64-ebs", + "name_regex": null, + "owner_id": "137112412989", + "owners": [ + "amazon" + ], + "platform": null, + "platform_details": "Linux/UNIX", + "product_codes": [], + "public": true, + "ramdisk_id": null, + "root_device_name": "/dev/xvda", + "root_device_type": "ebs", + "root_snapshot_id": "snap-0fbf7b35b6f00249f", + "sriov_net_support": "simple", + "state": "available", + "state_reason": { + "code": "UNSET", + "message": "UNSET" + }, + "tags": {}, + "usage_operation": "RunInstances", + "virtualization_type": "hvm" + }, + "sensitive_attributes": [] + } + ] + }, + { + "mode": "data", + "type": "aws_caller_identity", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "account_id": "123456789123", + "arn": "arn:aws:iam::123456789123:user/terraform-test", + "id": "123456789123", + "user_id": "AIDAT7X67JOMQS4DRTZRE" + }, + "sensitive_attributes": [] + } + ] + }, + { + "mode": "data", + "type": "aws_iam_policy_document", + "name": "iam_policy_eks", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "189502314", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "sts:AssumeRole" + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "eks.amazonaws.com" + ], + "type": "Service" + } + ], + "resources": [], + "sid": "" + } + ], + "version": "2012-10-17" + }, + "sensitive_attributes": [] + } + ] + }, + { + "mode": "data", + "type": "aws_iam_policy_document", + "name": "policy", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "3931805674", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"es:*\",\n \"Resource\": \"*\",\n \"Principal\": {\n \"AWS\": \"*\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "es:*" + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "*" + ], + "type": "AWS" + } + ], + "resources": [ + "*" + ], + "sid": "" + } + ], + "version": "2012-10-17" + }, + "sensitive_attributes": [] + } + ] + }, + { + "mode": "managed", + "type": "aws_db_instance", + "name": "default", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_db_option_group", + "name": "default", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:rds:us-west-1:123456789123:og:og-123456789123-acme-dev", + "engine_name": "mysql", + "id": "og-123456789123-acme-dev", + "major_engine_version": "8.0", + "name": "og-123456789123-acme-dev", + "name_prefix": null, + "option": [], + "option_group_description": "Terraform OG", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-og" + }, + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo5MDAwMDAwMDAwMDB9fQ==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_db_parameter_group", + "name": "default", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:rds:us-west-1:123456789123:pg:pg-123456789123-acme-dev", + "description": "Terraform PG", + "family": "mysql8.0", + "id": "pg-123456789123-acme-dev", + "name": "pg-123456789123-acme-dev", + "name_prefix": null, + "parameter": [ + { + "apply_method": "immediate", + "name": "character_set_client", + "value": "utf8" + }, + { + "apply_method": "immediate", + "name": "character_set_server", + "value": "utf8" + } + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-pg" + } + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_db_subnet_group", + "name": "default", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_ebs_snapshot", + "name": "example_snapshot", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_ecr_repository", + "name": "repository", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ecr:us-west-1:123456789123:repository/123456789123-acme-dev-repository", + "encryption_configuration": [ + { + "encryption_type": "AES256", + "kms_key": "" + } + ], + "id": "123456789123-acme-dev-repository", + "image_scanning_configuration": [ + { + "scan_on_push": false + } + ], + "image_tag_mutability": "MUTABLE", + "name": "123456789123-acme-dev-repository", + "registry_id": "123456789123", + "repository_url": "123456789123.dkr.ecr.us-west-1.amazonaws.com/123456789123-acme-dev-repository", + "tags": { + "Name": "123456789123-acme-dev-repository" + }, + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_eks_cluster", + "name": "eks_cluster", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_elasticsearch_domain", + "name": "monitoring-framework", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "access_policies": null, + "advanced_options": { + "rest.action.multi.allow_explicit_index": "true" + }, + "advanced_security_options": [ + { + "enabled": false, + "internal_user_database_enabled": false, + "master_user_options": [] + } + ], + "arn": "arn:aws:es:us-west-1:123456789123:domain/tg-dev-es", + "cluster_config": [ + { + "dedicated_master_count": 0, + "dedicated_master_enabled": false, + "dedicated_master_type": "", + "instance_count": 1, + "instance_type": "t2.small.elasticsearch", + "warm_count": 0, + "warm_enabled": false, + "warm_type": "", + "zone_awareness_config": [], + "zone_awareness_enabled": false + } + ], + "cognito_options": [ + { + "enabled": false, + "identity_pool_id": "", + "role_arn": "", + "user_pool_id": "" + } + ], + "domain_endpoint_options": [ + { + "custom_endpoint": "", + "custom_endpoint_certificate_arn": "", + "custom_endpoint_enabled": false, + "enforce_https": false, + "tls_security_policy": "Policy-Min-TLS-1-0-2019-07" + } + ], + "domain_id": "123456789123/tg-dev-es", + "domain_name": "tg-dev-es", + "ebs_options": [ + { + "ebs_enabled": true, + "iops": 0, + "volume_size": 30, + "volume_type": "gp2" + } + ], + "elasticsearch_version": "2.3", + "encrypt_at_rest": [ + { + "enabled": false, + "kms_key_id": "" + } + ], + "endpoint": "search-tg-dev-es-rvpxr7favqm65dtzai7gw66i6i.us-west-1.es.amazonaws.com", + "id": "arn:aws:es:us-west-1:123456789123:domain/tg-dev-es", + "kibana_endpoint": "search-tg-dev-es-rvpxr7favqm65dtzai7gw66i6i.us-west-1.es.amazonaws.com/_plugin/kibana/", + "log_publishing_options": [], + "node_to_node_encryption": [ + { + "enabled": false + } + ], + "snapshot_options": [ + { + "automated_snapshot_start_hour": 0 + } + ], + "tags": null, + "timeouts": null, + "vpc_options": [] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsidXBkYXRlIjozNjAwMDAwMDAwMDAwfX0=" + } + ] + }, + { + "mode": "managed", + "type": "aws_elb", + "name": "weblb", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_flow_log", + "name": "vpcflowlogs", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-1:123456789123:vpc-flow-log/fl-09f65a63764e5c568", + "eni_id": null, + "iam_role_arn": "", + "id": "fl-09f65a63764e5c568", + "log_destination": "arn:aws:s3:::123456789123-acme-dev-flowlogs", + "log_destination_type": "s3", + "log_format": "${version} ${account-id} ${interface-id} ${srcaddr} ${dstaddr} ${srcport} ${dstport} ${protocol} ${packets} ${bytes} ${start} ${end} ${action} ${log-status}", + "log_group_name": "", + "max_aggregation_interval": 600, + "subnet_id": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs" + }, + "traffic_type": "ALL", + "vpc_id": "vpc-0298053d746216f7f" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_s3_bucket.flowbucket", + "aws_vpc.web_vpc", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_access_key", + "name": "user", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "create_date": "2021-04-24T19:38:14Z", + "encrypted_secret": null, + "id": "{{REDACTED}}", + "key_fingerprint": null, + "pgp_key": null, + "secret": "{{REDACTED}}", + "ses_smtp_password_v4": "BHDMXZETY08jRAt+9BIgy94oOOus0e+ou8XGe8q005p9", + "status": "Active", + "user": "123456789123-acme-dev-user" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_iam_user.user", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_instance_profile", + "name": "ec2profile", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::123456789123:instance-profile/123456789123-acme-dev-profile", + "create_date": "2021-04-24T19:38:16Z", + "id": "123456789123-acme-dev-profile", + "name": "123456789123-acme-dev-profile", + "name_prefix": null, + "path": "/", + "role": "123456789123-acme-dev-role", + "tags": null, + "unique_id": "AIPAT7X67JOM6RVM6Q3LO" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_iam_role.ec2role", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_role", + "name": "ec2role", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::123456789123:role/123456789123-acme-dev-role", + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ec2.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}", + "create_date": "2021-04-24T19:38:11Z", + "description": "", + "force_detach_policies": false, + "id": "123456789123-acme-dev-role", + "inline_policy": [ + { + "name": "", + "policy": "" + } + ], + "managed_policy_arns": [], + "max_session_duration": 3600, + "name": "123456789123-acme-dev-role", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-role" + }, + "unique_id": "AROAT7X67JOMVZTX4323Z" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_role", + "name": "iam_for_eks", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::123456789123:role/123456789123-acme-dev-iam-for-eks", + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"eks.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}", + "create_date": "2021-04-24T19:38:11Z", + "description": "", + "force_detach_policies": false, + "id": "123456789123-acme-dev-iam-for-eks", + "inline_policy": [ + { + "name": "", + "policy": "" + } + ], + "managed_policy_arns": [], + "max_session_duration": 3600, + "name": "123456789123-acme-dev-iam-for-eks", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + "unique_id": "AROAT7X67JOMTVICHXBDF" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current", + "data.aws_iam_policy_document.iam_policy_eks" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_role", + "name": "iam_for_lambda", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::123456789123:role/123456789123-acme-dev-analysis-lambda", + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}", + "create_date": "2021-04-24T19:38:11Z", + "description": "", + "force_detach_policies": false, + "id": "123456789123-acme-dev-analysis-lambda", + "inline_policy": [ + { + "name": "", + "policy": "" + } + ], + "managed_policy_arns": [], + "max_session_duration": 3600, + "name": "123456789123-acme-dev-analysis-lambda", + "name_prefix": null, + "path": "/", + "permissions_boundary": null, + "tags": null, + "unique_id": "AROAT7X67JOM4BSNFUZ2F" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_role_policy", + "name": "ec2policy", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "123456789123-acme-dev-role:123456789123-acme-dev-policy", + "name": "123456789123-acme-dev-policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"s3:*\",\n \"ec2:*\",\n \"rds:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + "role": "123456789123-acme-dev-role" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_iam_role.ec2role", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_role_policy_attachment", + "name": "policy_attachment-AmazonEKSClusterPolicy", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "123456789123-acme-dev-iam-for-eks-20210424193817150000000001", + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + "role": "123456789123-acme-dev-iam-for-eks" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_iam_role.iam_for_eks", + "data.aws_caller_identity.current", + "data.aws_iam_policy_document.iam_policy_eks" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_role_policy_attachment", + "name": "policy_attachment-AmazonEKSServicePolicy", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "123456789123-acme-dev-iam-for-eks-20210424193817230700000002", + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSServicePolicy", + "role": "123456789123-acme-dev-iam-for-eks" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_iam_role.iam_for_eks", + "data.aws_caller_identity.current", + "data.aws_iam_policy_document.iam_policy_eks" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_user", + "name": "user", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::123456789123:user/123456789123-acme-dev-user", + "force_destroy": true, + "id": "123456789123-acme-dev-user", + "name": "123456789123-acme-dev-user", + "path": "/", + "permissions_boundary": null, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-user" + }, + "unique_id": "AIDAT7X67JOM5PXPRDEGW" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_iam_user_policy", + "name": "userpolicy", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "123456789123-acme-dev-user:excess_policy", + "name": "excess_policy", + "name_prefix": null, + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"ec2:*\",\n \"s3:*\",\n \"lambda:*\",\n \"cloudwatch:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n", + "user": "123456789123-acme-dev-user" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_iam_user.user", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_instance", + "name": "db_app", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_instance", + "name": "web_host", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_internet_gateway", + "name": "web_igw", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-1:123456789123:internet-gateway/igw-082131af76a7d0175", + "id": "igw-082131af76a7d0175", + "owner_id": "123456789123", + "tags": { + "Name": "123456789123-acme-dev-igw" + }, + "vpc_id": "vpc-0298053d746216f7f" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_vpc.web_vpc", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_kms_alias", + "name": "logs_key_alias", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:kms:us-west-1:123456789123:alias/123456789123-acme-dev-logs-bucket-key", + "id": "alias/123456789123-acme-dev-logs-bucket-key", + "name": "alias/123456789123-acme-dev-logs-bucket-key", + "name_prefix": null, + "target_key_arn": "arn:aws:kms:us-west-1:123456789123:key/b04ce016-498b-400c-a332-8cbc40d838d6", + "target_key_id": "b04ce016-498b-400c-a332-8cbc40d838d6" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_kms_key.logs_key", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_kms_key", + "name": "logs_key", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:kms:us-west-1:123456789123:key/b04ce016-498b-400c-a332-8cbc40d838d6", + "customer_master_key_spec": "SYMMETRIC_DEFAULT", + "deletion_window_in_days": 7, + "description": "123456789123-acme-dev-logs bucket key", + "enable_key_rotation": false, + "id": "b04ce016-498b-400c-a332-8cbc40d838d6", + "is_enabled": true, + "key_id": "b04ce016-498b-400c-a332-8cbc40d838d6", + "key_usage": "ENCRYPT_DECRYPT", + "policy": "{\"Id\":\"key-default-1\",\"Statement\":[{\"Action\":\"kms:*\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789123:root\"},\"Resource\":\"*\",\"Sid\":\"Enable IAM User Permissions\"}],\"Version\":\"2012-10-17\"}", + "tags": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_lambda_function", + "name": "analysis_lambda", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:lambda:us-west-1:123456789123:function:123456789123-acme-dev-analysis", + "code_signing_config_arn": "", + "dead_letter_config": [], + "description": "", + "environment": [ + { + "variables": { + "access_key": "{{REDACTED}}", + "secret_key": "{{REDACTED}}" + } + } + ], + "file_system_config": [], + "filename": "resources/lambda_function_payload.zip", + "function_name": "123456789123-acme-dev-analysis", + "handler": "exports.test", + "id": "123456789123-acme-dev-analysis", + "image_config": [], + "image_uri": "", + "invoke_arn": "arn:aws:apigateway:us-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-1:123456789123:function:123456789123-acme-dev-analysis/invocations", + "kms_key_arn": "", + "last_modified": "2021-04-24T19:38:23.049+0000", + "layers": null, + "memory_size": 128, + "package_type": "Zip", + "publish": false, + "qualified_arn": "arn:aws:lambda:us-west-1:123456789123:function:123456789123-acme-dev-analysis:$LATEST", + "reserved_concurrent_executions": -1, + "role": "arn:aws:iam::123456789123:role/123456789123-acme-dev-analysis-lambda", + "runtime": "nodejs12.x", + "s3_bucket": null, + "s3_key": null, + "s3_object_version": null, + "signing_job_arn": "", + "signing_profile_version_arn": "", + "source_code_hash": "Fne61Y/F2pmVywaVqIYcztFMK3LNeMJKpWFNnxDdGTw=", + "source_code_size": 195, + "tags": null, + "timeout": 3, + "timeouts": null, + "tracing_config": [ + { + "mode": "PassThrough" + } + ], + "version": "$LATEST", + "vpc_config": [] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDB9fQ==", + "dependencies": [ + "aws_iam_role.iam_for_lambda", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_neptune_cluster", + "name": "default", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "apply_immediately": true, + "arn": "arn:aws:rds:us-west-1:123456789123:cluster:neptunedb1", + "availability_zones": [ + "us-west-1a", + "us-west-1c" + ], + "backup_retention_period": 5, + "cluster_identifier": "neptunedb1", + "cluster_identifier_prefix": null, + "cluster_members": [], + "cluster_resource_id": "cluster-SQCJI6MTE6NOU4XXFHHCDL4MHQ", + "deletion_protection": false, + "enable_cloudwatch_logs_exports": null, + "endpoint": "neptunedb1.cluster-cvotzycutst0.us-west-1.neptune.amazonaws.com", + "engine": "neptune", + "engine_version": "1.0.4.1", + "final_snapshot_identifier": null, + "hosted_zone_id": "Z3SCU83UEWU45J", + "iam_database_authentication_enabled": false, + "iam_roles": null, + "id": "neptunedb1", + "kms_key_arn": "", + "neptune_cluster_parameter_group_name": "default.neptune1", + "neptune_subnet_group_name": "default", + "port": 8182, + "preferred_backup_window": "07:00-09:00", + "preferred_maintenance_window": "fri:09:43-fri:10:13", + "reader_endpoint": "neptunedb1.cluster-ro-cvotzycutst0.us-west-1.neptune.amazonaws.com", + "replication_source_identifier": "", + "skip_final_snapshot": true, + "snapshot_identifier": null, + "storage_encrypted": false, + "tags": null, + "timeouts": null, + "vpc_security_group_ids": [ + "sg-06efc27a" + ] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo3MjAwMDAwMDAwMDAwLCJkZWxldGUiOjcyMDAwMDAwMDAwMDAsInVwZGF0ZSI6NzIwMDAwMDAwMDAwMH19" + } + ] + }, + { + "mode": "managed", + "type": "aws_neptune_cluster_instance", + "name": "default", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "address": "tf-20210424193926945700000003.cvotzycutst0.us-west-1.neptune.amazonaws.com", + "apply_immediately": true, + "arn": "arn:aws:rds:us-west-1:123456789123:db:tf-20210424193926945700000003", + "auto_minor_version_upgrade": true, + "availability_zone": "us-west-1c", + "cluster_identifier": "neptunedb1", + "dbi_resource_id": "db-DTVPYJ6XOWLOWAJSDHUIP5VHI4", + "endpoint": "tf-20210424193926945700000003.cvotzycutst0.us-west-1.neptune.amazonaws.com:8182", + "engine": "neptune", + "engine_version": "1.0.4.1", + "id": "tf-20210424193926945700000003", + "identifier": "tf-20210424193926945700000003", + "identifier_prefix": null, + "instance_class": "db.t3.medium", + "kms_key_arn": "", + "neptune_parameter_group_name": "default.neptune1", + "neptune_subnet_group_name": "default", + "port": 8182, + "preferred_backup_window": "07:00-09:00", + "preferred_maintenance_window": "mon:11:54-mon:12:24", + "promotion_tier": 0, + "publicly_accessible": false, + "storage_encrypted": false, + "tags": null, + "timeouts": null, + "writer": true + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo1NDAwMDAwMDAwMDAwLCJkZWxldGUiOjU0MDAwMDAwMDAwMDAsInVwZGF0ZSI6NTQwMDAwMDAwMDAwMH19", + "dependencies": [ + "aws_neptune_cluster.default" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_neptune_cluster_snapshot", + "name": "default", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "allocated_storage": 0, + "availability_zones": [ + "us-west-1a", + "us-west-1c" + ], + "db_cluster_identifier": "neptunedb1", + "db_cluster_snapshot_arn": "arn:aws:rds:us-west-1:123456789123:cluster-snapshot:resourcetestsnapshot1", + "db_cluster_snapshot_identifier": "resourcetestsnapshot1", + "engine": "neptune", + "engine_version": "1.0.4.1", + "id": "resourcetestsnapshot1", + "kms_key_id": "", + "license_model": "neptune", + "port": 0, + "snapshot_type": "manual", + "source_db_cluster_snapshot_arn": "", + "status": "available", + "storage_encrypted": false, + "timeouts": null, + "vpc_id": "vpc-0a626e6d" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwfX0=", + "dependencies": [ + "aws_neptune_cluster.default" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_network_interface", + "name": "web-eni", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_route", + "name": "public_internet_gateway", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "carrier_gateway_id": "", + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": "", + "destination_prefix_list_id": "", + "egress_only_gateway_id": "", + "gateway_id": "igw-082131af76a7d0175", + "id": "r-rtb-08411ab7d385c00a11080289494", + "instance_id": "", + "instance_owner_id": "", + "local_gateway_id": "", + "nat_gateway_id": "", + "network_interface_id": "", + "origin": "CreateRoute", + "route_table_id": "rtb-08411ab7d385c00a1", + "state": "active", + "timeouts": { + "create": "5m", + "delete": null + }, + "transit_gateway_id": "", + "vpc_endpoint_id": "", + "vpc_peering_connection_id": "" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwfX0=", + "dependencies": [ + "aws_internet_gateway.web_igw", + "aws_route_table.web_rtb", + "aws_vpc.web_vpc", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_route_table", + "name": "web_rtb", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-1:123456789123:route-table/rtb-08411ab7d385c00a1", + "id": "rtb-08411ab7d385c00a1", + "owner_id": "123456789123", + "propagating_vgws": [], + "route": [], + "tags": { + "Name": "123456789123-acme-dev-rtb" + }, + "vpc_id": "vpc-0298053d746216f7f" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_vpc.web_vpc", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_route_table_association", + "name": "rtbassoc", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_route_table_association", + "name": "rtbassoc2", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_s3_bucket", + "name": "data", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "public-read", + "arn": "arn:aws:s3:::123456789123-acme-dev-data", + "bucket": "123456789123-acme-dev-data", + "bucket_domain_name": "123456789123-acme-dev-data.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "123456789123-acme-dev-data.s3.us-west-1.amazonaws.com", + "cors_rule": [], + "force_destroy": true, + "grant": [], + "hosted_zone_id": "Z2F56UZL2M1ACD", + "id": "123456789123-acme-dev-data", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "us-west-1", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-data" + }, + "versioning": [ + { + "enabled": false, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_s3_bucket", + "name": "data_science", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "private", + "arn": "arn:aws:s3:::123456789123-acme-dev-data-science", + "bucket": "123456789123-acme-dev-data-science", + "bucket_domain_name": "123456789123-acme-dev-data-science.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "123456789123-acme-dev-data-science.s3.us-west-1.amazonaws.com", + "cors_rule": [], + "force_destroy": true, + "grant": [], + "hosted_zone_id": "Z2F56UZL2M1ACD", + "id": "123456789123-acme-dev-data-science", + "lifecycle_rule": [], + "logging": [ + { + "target_bucket": "123456789123-acme-dev-logs", + "target_prefix": "log/" + } + ], + "object_lock_configuration": [], + "policy": null, + "region": "us-west-1", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": null, + "versioning": [ + { + "enabled": true, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_kms_key.logs_key", + "aws_s3_bucket.logs", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_s3_bucket", + "name": "financials", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "private", + "arn": "arn:aws:s3:::123456789123-acme-dev-financials", + "bucket": "123456789123-acme-dev-financials", + "bucket_domain_name": "123456789123-acme-dev-financials.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "123456789123-acme-dev-financials.s3.us-west-1.amazonaws.com", + "cors_rule": [], + "force_destroy": true, + "grant": [], + "hosted_zone_id": "Z2F56UZL2M1ACD", + "id": "123456789123-acme-dev-financials", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "us-west-1", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-financials" + }, + "versioning": [ + { + "enabled": false, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_s3_bucket", + "name": "flowbucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "private", + "arn": "arn:aws:s3:::123456789123-acme-dev-flowlogs", + "bucket": "123456789123-acme-dev-flowlogs", + "bucket_domain_name": "123456789123-acme-dev-flowlogs.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "123456789123-acme-dev-flowlogs.s3.us-west-1.amazonaws.com", + "cors_rule": [], + "force_destroy": true, + "grant": [], + "hosted_zone_id": "Z2F56UZL2M1ACD", + "id": "123456789123-acme-dev-flowlogs", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "us-west-1", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-flowlogs" + }, + "versioning": [ + { + "enabled": false, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_s3_bucket", + "name": "logs", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "log-delivery-write", + "arn": "arn:aws:s3:::123456789123-acme-dev-logs", + "bucket": "123456789123-acme-dev-logs", + "bucket_domain_name": "123456789123-acme-dev-logs.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "123456789123-acme-dev-logs.s3.us-west-1.amazonaws.com", + "cors_rule": [], + "force_destroy": true, + "grant": [], + "hosted_zone_id": "Z2F56UZL2M1ACD", + "id": "123456789123-acme-dev-logs", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "us-west-1", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [ + { + "rule": [ + { + "apply_server_side_encryption_by_default": [ + { + "kms_master_key_id": "arn:aws:kms:us-west-1:123456789123:key/b04ce016-498b-400c-a332-8cbc40d838d6", + "sse_algorithm": "aws:kms" + } + ], + "bucket_key_enabled": false + } + ] + } + ], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-logs" + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_kms_key.logs_key", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_s3_bucket", + "name": "operations", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "private", + "arn": "arn:aws:s3:::123456789123-acme-dev-operations", + "bucket": "123456789123-acme-dev-operations", + "bucket_domain_name": "123456789123-acme-dev-operations.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "123456789123-acme-dev-operations.s3.us-west-1.amazonaws.com", + "cors_rule": [], + "force_destroy": true, + "grant": [], + "hosted_zone_id": "Z2F56UZL2M1ACD", + "id": "123456789123-acme-dev-operations", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "us-west-1", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-operations" + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_s3_bucket_object", + "name": "data_object", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acl": "private", + "bucket": "123456789123-acme-dev-data", + "bucket_key_enabled": false, + "cache_control": "", + "content": null, + "content_base64": null, + "content_disposition": "", + "content_encoding": "", + "content_language": "", + "content_type": "binary/octet-stream", + "etag": "e0503b22cec66928e560c4351a091dc3", + "force_destroy": false, + "id": "customer-master.xlsx", + "key": "customer-master.xlsx", + "kms_key_id": null, + "metadata": null, + "object_lock_legal_hold_status": "", + "object_lock_mode": "", + "object_lock_retain_until_date": "", + "server_side_encryption": "", + "source": "resources/customer-master.xlsx", + "storage_class": "STANDARD", + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-customer-master" + }, + "version_id": "", + "website_redirect": "" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_s3_bucket.data", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group", + "name": "default", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-1:123456789123:security-group/sg-0b55859d6c0d932a0", + "description": "Managed by Terraform", + "egress": [], + "id": "sg-0b55859d6c0d932a0", + "ingress": [], + "name": "123456789123-acme-dev-rds-sg", + "name_prefix": "", + "owner_id": "123456789123", + "revoke_rules_on_delete": false, + "tags": { + "Environment": "123456789123-acme-dev", + "Name": "123456789123-acme-dev-rds-sg" + }, + "timeouts": null, + "vpc_id": "vpc-0298053d746216f7f" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "aws_vpc.web_vpc", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group", + "name": "web-node", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-1:123456789123:security-group/sg-0dbca00ac30afe1e9", + "description": "123456789123-acme-dev Security Group", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0 + } + ], + "id": "sg-0dbca00ac30afe1e9", + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 22, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 22 + }, + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 80, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 80 + } + ], + "name": "123456789123-acme-dev-sg", + "name_prefix": "", + "owner_id": "123456789123", + "revoke_rules_on_delete": false, + "tags": null, + "timeouts": null, + "vpc_id": "vpc-0298053d746216f7f" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "aws_vpc.web_vpc", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group_rule", + "name": "egress", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 2, + "attributes": { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": null, + "from_port": 0, + "id": "sgrule-928930539", + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "-1", + "security_group_id": "sg-0b55859d6c0d932a0", + "self": false, + "source_security_group_id": null, + "to_port": 0, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "aws_security_group.default", + "aws_vpc.web_vpc", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group_rule", + "name": "ingress", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 2, + "attributes": { + "cidr_blocks": [ + "172.16.0.0/16" + ], + "description": null, + "from_port": 3306, + "id": "sgrule-3786380129", + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "tcp", + "security_group_id": "sg-0b55859d6c0d932a0", + "self": false, + "source_security_group_id": null, + "to_port": 3306, + "type": "ingress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "aws_security_group.default", + "aws_vpc.web_vpc", + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_volume_attachment", + "name": "ebs_att", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [] + }, + { + "mode": "managed", + "type": "aws_vpc", + "name": "eks_vpc", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-1:123456789123:vpc/vpc-06274f27fbd6a66b8", + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.10.0.0/16", + "default_network_acl_id": "acl-083dc2b8ec05d2e41", + "default_route_table_id": "rtb-02e6eeb7318e446d8", + "default_security_group_id": "sg-0031b373a2aa530f7", + "dhcp_options_id": "dopt-c77748a0", + "enable_classiclink": false, + "enable_classiclink_dns_support": false, + "enable_dns_hostnames": true, + "enable_dns_support": true, + "id": "vpc-06274f27fbd6a66b8", + "instance_tenancy": "default", + "ipv6_association_id": "", + "ipv6_cidr_block": "", + "main_route_table_id": "rtb-02e6eeb7318e446d8", + "owner_id": "123456789123", + "tags": { + "Name": "123456789123-acme-dev-eks-vpc" + }, + "tags_all": { + "Name": "123456789123-acme-dev-eks-vpc" + } + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_vpc", + "name": "web_vpc", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-1:123456789123:vpc/vpc-0298053d746216f7f", + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "172.16.0.0/16", + "default_network_acl_id": "acl-0325e69620cbb2437", + "default_route_table_id": "rtb-0359f655b15cd95d7", + "default_security_group_id": "sg-0c50d22dff25d48ec", + "dhcp_options_id": "dopt-c77748a0", + "enable_classiclink": false, + "enable_classiclink_dns_support": false, + "enable_dns_hostnames": true, + "enable_dns_support": true, + "id": "vpc-0298053d746216f7f", + "instance_tenancy": "default", + "ipv6_association_id": "", + "ipv6_cidr_block": "", + "main_route_table_id": "rtb-0359f655b15cd95d7", + "owner_id": "123456789123", + "tags": { + "Name": "123456789123-acme-dev-vpc" + }, + "tags_all": { + "Name": "123456789123-acme-dev-vpc" + } + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "dependencies": [ + "data.aws_caller_identity.current" + ] + } + ] + }, + { + "mode": "managed", + "type": "null_resource", + "name": "push_image", + "provider": "provider[\"registry.terraform.io/hashicorp/null\"]", + "instances": [ + { + "status": "tainted", + "schema_version": 0, + "attributes": { + "id": "6150981843333928658", + "triggers": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_ecr_repository.repository", + "data.aws_caller_identity.current" + ] + } + ] + } + ] +} diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..febbee6 --- /dev/null +++ b/setup.py @@ -0,0 +1,13 @@ +from setuptools import setup + + +setup(name='tfquery', + version='0.0.1', + author='Mazin Ahmed', + author_email='mazin@mazinahmed.net', + packages=['tfquery'], + entry_points={'console_scripts': ['tfquery=tfquery.__main__:main']}, + url='http://pypi.python.org/pypi/tfquery/', + license='LICENSE.md', + description='tfquery: Run SQL queries on your Terraform infrastructure. Query resources and analyze its configuration using a SQL-powered framework.', + long_description=open('README.md').read()) diff --git a/tfquery/__init__.py b/tfquery/__init__.py new file mode 100644 index 0000000..aa43e9e --- /dev/null +++ b/tfquery/__init__.py @@ -0,0 +1,4 @@ +import tfquery.tfstate +import tfquery.sql_handler +import tfquery.tfstate_v3_migration +import tfquery.utils diff --git a/tfquery/__main__.py b/tfquery/__main__.py new file mode 100644 index 0000000..a949ab1 --- /dev/null +++ b/tfquery/__main__.py @@ -0,0 +1,72 @@ +#!/usr/env python3 +import argparse +import sys +import logging + +from tfquery.sql_handler import SQLHandler +import tfquery.utils as utils +from tfquery.sql_handler import get_random_db_path + + +def main(): + parser = argparse.ArgumentParser( + description='tfquery-cli: Run SQL queries on your Terraform infrastructure.') + parser.add_argument('--tfstate', dest='tfstate', action='store', + help='Terraform .tfstate file.') + parser.add_argument('--tfstate-dir', dest='tfstate_dir', action='store', + help='Directory of Terraform .tfstate files, for running queries on environments.') + parser.add_argument('--query', '-q', dest='query', action='store', + help='SQL query to execute.') + parser.add_argument('--db', dest='db_path', action='store', + help='DB path (optional. default: temporarily-generated database).') + parser.add_argument('--interactive', '-i', dest='interactive_mode', action='store_true', + help='Interactive mode.') + parser.add_argument('--import', dest='import_tfstate', action='store_true', + help='Import tfstate into database.') + args = parser.parse_args() + logging.basicConfig(format='%(message)s') + log = logging.getLogger("tfquery") + + if len(sys.argv) <= 1: + log.error("tfquery-cli: Run with -h for help") + exit(1) + + tfstates = [] + if args.tfstate: + for f in args.tfstate.split(","): + tfstates.append(f) + + if args.tfstate_dir: + tfstates.extend(utils.get_all_tfstates(args.tfstate_dir)) + + if len(tfstates) == 0 and args.import_tfstate: + log.error("Terraform states are not provided. Run -h for help.") + exit(1) + + if len(tfstates) == 0 and args.db_path is None: + log.error("Both Terraform states and database are not specified.") + exit(1) + + if args.db_path is None: + args.db_path = get_random_db_path() + args.import_tfstate = True + + if args.import_tfstate: + for tfstate in tfstates: + utils.import_tfstate(args.db_path, tfstate) + + if args.query: + s = SQLHandler(hide_attributes=True, db_path=args.db_path) + print() + print(utils.beautify_json(s.query(args.query))) + + if args.interactive_mode: + while True: + print("%> ", end="") + q = input() + s = SQLHandler(hide_attributes=True, db_path=args.db_path) + print() + print(utils.beautify_json(s.query(q))) + +if __name__ == "__main__": + main() diff --git a/tfquery/sql_handler.py b/tfquery/sql_handler.py new file mode 100644 index 0000000..aecfbb5 --- /dev/null +++ b/tfquery/sql_handler.py @@ -0,0 +1,123 @@ +import sqlite3 +import json +import os +import uuid + + +def get_random_db_path(): + return f"/tmp/.{uuid.uuid4()}.db" + + +def dict_factory(cursor, row): + d = {} + for idx, col in enumerate(cursor.description): + d[col[0]] = row[idx] + return d + + +class SQLHandler(object): + def __init__(self, hide_attributes=True, db_path=None, in_memory=False, tfstate_file=None): + self.hide_attributes = hide_attributes + self.db_path = db_path + self.tfstate_file = tfstate_file + if self.db_path is None: + self.db_path = get_random_db_path() + if in_memory: + self.db_path = "file::memory:" + self.conn = self.get_new_db() + self.conn.row_factory = dict_factory + self.cursor = self.conn.cursor() + + def create_table(self, resources): + if self.hide_attributes: + resources = self.__hide_attributes(resources) + if len(resources) == 0: + k = ['mode', 'type', 'name', 'provider', 'module', 'attributes', 'dependencies'] + else: + k = list(resources[0].keys()) + + k.append("tfstate_file") + + + sql = "CREATE TABLE IF NOT EXISTS resources(\n" + for i in enumerate(k): + if i[1] in ("attributes", "dependencies"): + sql += f"`{i[1]}` json default null" + else: + sql += f"`{i[1]}` text default null" + if i[0] != len(k) - 1: + sql += ",\n" + sql += '\n)' + + self.cursor.execute(sql) + + def get_new_db(self): + self.conn = sqlite3.connect(self.db_path) + return self.conn + + def remove_db(self): + if self.db_path: + if os.path.exists(self.db_path): + os.remove(self.db_path) + + def return_db(self): + return self.conn + + def query(self, sql, parse_attributes=True): + self.cursor.execute(sql) + res = self.cursor.fetchall() + if parse_attributes is False: + return res + output = [] + for i in res: + if "attributes" in i: + i["attributes"] = json.loads(i["attributes"]) + if "dependencies" in i: + i["dependencies"] = json.loads(i["dependencies"]) + output.append(i) + + return output + + def insert_resources(self, resources): + if self.hide_attributes: + resources = self.__hide_attributes(resources) + for resource in resources: + self.insert_resource(resource) + + def __hide_attributes(self, resources): + output = [] + for resource in resources: + new_resource = {} + for j in resource.keys(): + if j.startswith("__"): + continue + new_resource[j] = resource[j] + output.append(new_resource) + return output + + def insert_resource(self, resource): + resource["tfstate_file"] = os.path.basename(self.tfstate_file) + + sql = "INSERT INTO resources(" + for i in enumerate(resource): + sql += f"`{i[1]}`" + sql += ", " + + sql = sql[0:-2] + sql += ") VALUES (" + + for i in enumerate(resource): + sql += f":{i[1]}" + sql += ", " + sql = sql[0:-2] + sql += ");" + + for k in resource.keys(): + if type(resource[k]) not in [str, type(None)]: + resource[k] = json.dumps(resource[k]) + + try: + self.cursor.execute(sql, resource) + self.conn.commit() + except Exception as e: + print(e) diff --git a/tfquery/tfstate.py b/tfquery/tfstate.py new file mode 100644 index 0000000..2a0bf2e --- /dev/null +++ b/tfquery/tfstate.py @@ -0,0 +1,118 @@ +from tfquery.tfstate_v3_migration import upgrade_v3_tfstate +import json +from tfquery.sql_handler import SQLHandler +import logging + + +def validate_tfstate(tfstate): + if "terraform_version" not in tfstate.keys(): + raise ValueError("Invalid tfstate file") + return False + if tfstate["version"] < 3: + raise ValueError("Unsupported tfstate version") + return False + return True + + +def prepare_tfstate(tfstate): + resources = [] + if tfstate["version"] == 3: + tfstate = upgrade_v3_tfstate(tfstate) + tfstate_updated = tfstate + + for i in tfstate["resources"]: + data = {} + data.update(i) + if "module" not in data: + data["module"] = "none" + assert data["mode"] + assert data["type"] + assert data["name"] + assert data["provider"] + assert "instances" in data + assert "module" in data + resources.append(data) + tfstate_updated["resources"] = resources + return tfstate_updated + + +def get_all_attributes(tfstate): + attributes = [] + for i in tfstate["resources"]: + for j in i["instances"]: + attributes.extend(j["attributes"].keys()) + + def lowercase_all(k): + return [i.lower() for i in k] + + attributes = lowercase_all(attributes) + attributes = list(set(attributes)) + return attributes + + +def get_resources(tfstate): + tfstate = prepare_tfstate(tfstate) + resources = [] + for resource in tfstate["resources"]: + for instance in resource["instances"]: + data = {} + data["mode"] = resource["mode"] + data["type"] = resource["type"] + data["name"] = resource["name"] + data["provider"] = resource["provider"] + data["module"] = resource["module"] + data["attributes"] = instance["attributes"] + if "dependencies" in instance: + data["dependencies"] = instance["dependencies"] + else: + data["dependencies"] = [] + resources.append(data) + return resources + + +def get_detailed_resources(tfstate): + resources = get_resources(tfstate) + detailed_resources = [] + all_attributes = get_all_attributes(tfstate) + for resource in resources: + data = {} + data.update(resource) + + for i in all_attributes: + data["__" + i] = None + for k in resource["attributes"].keys(): + data["__" + k] = resource["attributes"][k] + detailed_resources.append(data) + return detailed_resources + + +def load_file(tfstate_file): + f = open(tfstate_file, "r") + tfstate = json.loads(f.read()) + f.close() + return tfstate + + +def parse_resources(tfstate_file, detailed=False): + tfstate = load_file(tfstate_file) + if validate_tfstate(tfstate) is False: + return([]) + if detailed: + resources = get_detailed_resources(tfstate) + else: + resources = get_resources(tfstate) + + return resources + + +def run_query(tfstate_file, query): + logging.basicConfig(format='%(message)s') + log = logging.getLogger("tfquery") + resources = parse_resources(tfstate_file) + s = SQLHandler(in_memory=True) + s.create_table(resources) + s.insert_resources(resources) + log.info(f">> {query}") + res = s.query(query) + s.remove_db() + return res diff --git a/tfquery/tfstate_v3_migration.py b/tfquery/tfstate_v3_migration.py new file mode 100644 index 0000000..d0d13c7 --- /dev/null +++ b/tfquery/tfstate_v3_migration.py @@ -0,0 +1,27 @@ +def get_resources(tfstate): + def __get_name(k): + s = k.split(".") + del s[0] + return ".".join(s) + output = [] + for a in tfstate["modules"]: + for b in a["resources"]: + data = {"type": None, "path": None, "mode": "version_3", "name": None, "provider": None, "instances": []} + data["path"] = "/".join(a["path"]) + data["type"] = a["resources"][b]["type"] + data["name"] = __get_name(b) + data["provider"] = a["resources"][b]["provider"] + + dependencies = a["resources"][b]["depends_on"] + attributes = a["resources"][b]["primary"]["attributes"] + data_object = {"attributes": attributes, "dependencies": dependencies} + + data["instances"].append(data_object) + output.append(data) + return output + + +def upgrade_v3_tfstate(tfstate): + tfstate["resources"] = get_resources(tfstate) + tfstate["version"] = 4 + return tfstate diff --git a/tfquery/utils.py b/tfquery/utils.py new file mode 100644 index 0000000..7f3a4cd --- /dev/null +++ b/tfquery/utils.py @@ -0,0 +1,36 @@ +#!/usr/env python3 +from os import listdir +from os.path import isfile +from os.path import join +import json +import logging + + +import tfquery.tfstate as tfstate +from tfquery.sql_handler import SQLHandler + + +def get_all_tfstates(dir): + onlyfiles = [join(dir, f) for f in listdir(dir) if isfile(join(dir, f))] + output = [] + for i in onlyfiles: + if i.endswith(".tfstate"): + output.append(i) + return output + + +def import_tfstate(db_path, tfstate_file): + logging.basicConfig(format='%(message)s') + log = logging.getLogger("tfquery") + log.info(f"[i] tfstate file: {tfstate_file}") + resources = tfstate.parse_resources(tfstate_file, detailed=True) + s = SQLHandler(hide_attributes=True, db_path=db_path, tfstate_file=tfstate_file) + log.info(f"[i] DB Path: {s.db_path}") + + s.create_table(resources) + s.insert_resources(resources) + log.info(f"[+] Imported {len(resources)} resources from {tfstate_file}.") + + +def beautify_json(j): + return json.dumps(j, indent=4, sort_keys=True)