mirror of
https://github.com/ghndrx/terraform.git
synced 2026-02-10 06:45:01 +00:00
cleanup folders and files
This commit is contained in:
74
aws/aws_vpc_peering/.terraform/terraform.tfstate
Normal file
74
aws/aws_vpc_peering/.terraform/terraform.tfstate
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"serial": 1,
|
||||||
|
"lineage": "d2c9bc57-2b6a-7881-0aa9-ac0ba7c8db89",
|
||||||
|
"backend": {
|
||||||
|
"type": "s3",
|
||||||
|
"config": {
|
||||||
|
"access_key": null,
|
||||||
|
"acl": null,
|
||||||
|
"allowed_account_ids": null,
|
||||||
|
"assume_role": null,
|
||||||
|
"assume_role_duration_seconds": null,
|
||||||
|
"assume_role_policy": null,
|
||||||
|
"assume_role_policy_arns": null,
|
||||||
|
"assume_role_tags": null,
|
||||||
|
"assume_role_transitive_tag_keys": null,
|
||||||
|
"assume_role_with_web_identity": null,
|
||||||
|
"bucket": "my-tf-bucket-ghndrx",
|
||||||
|
"custom_ca_bundle": null,
|
||||||
|
"dynamodb_endpoint": null,
|
||||||
|
"dynamodb_table": null,
|
||||||
|
"ec2_metadata_service_endpoint": null,
|
||||||
|
"ec2_metadata_service_endpoint_mode": null,
|
||||||
|
"encrypt": null,
|
||||||
|
"endpoint": null,
|
||||||
|
"endpoints": null,
|
||||||
|
"external_id": null,
|
||||||
|
"forbidden_account_ids": null,
|
||||||
|
"force_path_style": null,
|
||||||
|
"http_proxy": null,
|
||||||
|
"https_proxy": null,
|
||||||
|
"iam_endpoint": null,
|
||||||
|
"insecure": null,
|
||||||
|
"key": "aws_vpc_peering/terraform.tfstate",
|
||||||
|
"kms_key_id": null,
|
||||||
|
"max_retries": null,
|
||||||
|
"no_proxy": null,
|
||||||
|
"profile": null,
|
||||||
|
"region": "us-west-2",
|
||||||
|
"retry_mode": null,
|
||||||
|
"role_arn": null,
|
||||||
|
"secret_key": null,
|
||||||
|
"session_name": null,
|
||||||
|
"shared_config_files": null,
|
||||||
|
"shared_credentials_file": null,
|
||||||
|
"shared_credentials_files": null,
|
||||||
|
"skip_credentials_validation": null,
|
||||||
|
"skip_metadata_api_check": null,
|
||||||
|
"skip_region_validation": null,
|
||||||
|
"skip_requesting_account_id": null,
|
||||||
|
"skip_s3_checksum": null,
|
||||||
|
"sse_customer_key": null,
|
||||||
|
"sts_endpoint": null,
|
||||||
|
"sts_region": null,
|
||||||
|
"token": null,
|
||||||
|
"use_dualstack_endpoint": null,
|
||||||
|
"use_fips_endpoint": null,
|
||||||
|
"use_legacy_workflow": null,
|
||||||
|
"use_path_style": null,
|
||||||
|
"workspace_key_prefix": null
|
||||||
|
},
|
||||||
|
"hash": 1294417248
|
||||||
|
},
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"path": [
|
||||||
|
"root"
|
||||||
|
],
|
||||||
|
"outputs": {},
|
||||||
|
"resources": {},
|
||||||
|
"depends_on": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
|
terraform {
|
||||||
|
backend "s3" {
|
||||||
|
bucket = "my-tf-bucket-ghndrx"
|
||||||
|
key = "aws_vpc_peering/terraform.tfstate"
|
||||||
|
region = "us-west-2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Define AWS provider with aliases for us-west-1 and us-east-1 regions
|
# Define AWS provider with aliases for us-west-1 and us-east-1 regions
|
||||||
provider "aws" {
|
provider "aws" {
|
||||||
alias = "us-west-1"
|
alias = "us-west-1"
|
||||||
@@ -69,6 +77,20 @@ resource "aws_vpc_peering_connection_accepter" "peering_accepter" {
|
|||||||
provider = aws.us-east-1
|
provider = aws.us-east-1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "aws_route" "peer-route-us-west-1" {
|
||||||
|
route_table_id = aws_route_table.us-west-1-route-table.id
|
||||||
|
destination_cidr_block = aws_vpc.us-east-1.cidr_block
|
||||||
|
vpc_peering_connection_id = aws_vpc_peering_connection.peering_connection.id
|
||||||
|
provider = aws.us-west-1
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "aws_route" "peer-route-us-east-1" {
|
||||||
|
route_table_id = aws_route_table.us-east-1-route-table.id
|
||||||
|
destination_cidr_block = aws_vpc.us-west-1.cidr_block
|
||||||
|
vpc_peering_connection_id = aws_vpc_peering_connection.peering_connection.id
|
||||||
|
provider = aws.us-east-1
|
||||||
|
}
|
||||||
|
|
||||||
# Create route tables for each VPC and associate them with the respective subnets
|
# Create route tables for each VPC and associate them with the respective subnets
|
||||||
resource "aws_route_table" "us-west-1-route-table" {
|
resource "aws_route_table" "us-west-1-route-table" {
|
||||||
vpc_id = aws_vpc.us-west-1.id
|
vpc_id = aws_vpc.us-west-1.id
|
||||||
@@ -177,6 +199,12 @@ resource "aws_security_group" "us-west-1-instance-sg" {
|
|||||||
protocol = "-1"
|
protocol = "-1"
|
||||||
cidr_blocks = ["10.1.0.0/16", "0.0.0.0/0"]
|
cidr_blocks = ["10.1.0.0/16", "0.0.0.0/0"]
|
||||||
}
|
}
|
||||||
|
ingress {
|
||||||
|
from_port = -1
|
||||||
|
to_port = -1
|
||||||
|
protocol = "icmp"
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_security_group" "us-east-1-instance-sg" {
|
resource "aws_security_group" "us-east-1-instance-sg" {
|
||||||
@@ -215,6 +243,12 @@ resource "aws_security_group" "us-east-1-instance-sg" {
|
|||||||
protocol = "-1"
|
protocol = "-1"
|
||||||
cidr_blocks = ["10.1.0.0/16", "0.0.0.0/0"]
|
cidr_blocks = ["10.1.0.0/16", "0.0.0.0/0"]
|
||||||
}
|
}
|
||||||
|
ingress {
|
||||||
|
from_port = -1
|
||||||
|
to_port = -1
|
||||||
|
protocol = "icmp"
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create EC2 instances in each subnet
|
# Create EC2 instances in each subnet
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
9
aws/terraform-backend/terraform.tfstate
Normal file
9
aws/terraform-backend/terraform.tfstate
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"version": 4,
|
||||||
|
"terraform_version": "1.6.4",
|
||||||
|
"serial": 1,
|
||||||
|
"lineage": "d32d4884-4d57-90bf-bf50-91dba9c4212a",
|
||||||
|
"outputs": {},
|
||||||
|
"resources": [],
|
||||||
|
"check_results": null
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user