-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from pablo19sc/main
minor edits - map_public_ip_on_launch & tgw attachment tags
- Loading branch information
Showing
31 changed files
with
89 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
module "vpc" { | ||
# source = "aws-ia/vpc/aws" | ||
# version = ">= 3.0.2" | ||
source = "../.." | ||
|
||
name = "ipam-vpc" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,49 @@ | ||
data "aws_availability_zones" "current" {} | ||
|
||
module "vpc" { | ||
source = "aws-ia/vpc/aws" | ||
version = ">= 4.2.0" | ||
module "vpc1" { | ||
source = "../.." | ||
|
||
name = "flowlogs" | ||
cidr_block = "10.0.0.0/20" | ||
name = "vpc-cw-logs" | ||
cidr_block = "10.0.0.0/16" | ||
az_count = 2 | ||
|
||
subnets = { | ||
public = { | ||
name_prefix = "my-public" # omit to prefix with "public" | ||
netmask = 24 | ||
nat_gateway_configuration = "all_azs" # options: "single_az", "none" | ||
nat_gateway_configuration = "all_azs" | ||
tags = { | ||
subnet_type = "public" | ||
} | ||
} | ||
|
||
private = { | ||
# omitting name_prefix defaults value to "private" | ||
# name_prefix = "private" | ||
netmask = 24 | ||
connect_to_public_natgw = true | ||
} | ||
} | ||
|
||
vpc_flow_logs = var.vpc_flow_logs | ||
vpc_flow_logs = { | ||
log_destination_type = "cloud-watch-logs" | ||
retention_in_days = 180 | ||
} | ||
} | ||
|
||
module "vpc2" { | ||
source = "../.." | ||
|
||
name = "vpc-s3-logs" | ||
cidr_block = "10.0.0.0/16" | ||
az_count = 2 | ||
|
||
subnets = { | ||
endpoints = { netmask = 24 } | ||
workloads = { netmask = 24 } | ||
} | ||
|
||
vpc_flow_logs = { | ||
log_destination_type = "s3" | ||
destination_options = { | ||
file_format = "parquet" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1 @@ | ||
output "public_subnets" { | ||
description = "Map of public subnet attributes grouped by az." | ||
value = module.vpc.public_subnet_attributes_by_az | ||
} | ||
|
||
output "private_subnets" { | ||
description = "Map of private subnet attributes grouped by az." | ||
value = module.vpc.private_subnet_attributes_by_az | ||
} | ||
|
||
## Used for Testing, do not delete | ||
|
||
output "public_subnets_tags_length" { | ||
description = "Count of public subnet tags for a single az." | ||
value = length(module.vpc.public_subnet_attributes_by_az[data.aws_availability_zones.current.names[0]].tags) | ||
} | ||
|
||
output "private_subnets_tags_length" { | ||
description = "Count of private subnet tags for a single az." | ||
value = length(module.vpc.private_subnet_attributes_by_az["private/${data.aws_availability_zones.current.names[0]}"].tags) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,6 @@ | ||
variable "kms_key_id" { | ||
description = "KMS Key ID" | ||
variable "aws_region" { | ||
description = "AWS Region." | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "vpc_flow_logs" { | ||
description = "Whether or not to create VPC flow logs and which type. Options: \"cloudwatch\", \"s3\", \"none\"." | ||
|
||
type = object({ | ||
log_destination = optional(string) | ||
iam_role_arn = optional(string) | ||
kms_key_id = optional(string) | ||
|
||
log_destination_type = string | ||
retention_in_days = optional(number) | ||
tags = optional(map(string)) | ||
traffic_type = optional(string) | ||
destination_options = optional(object({ | ||
file_format = optional(string) | ||
hive_compatible_partitions = optional(bool) | ||
per_hour_partition = optional(bool) | ||
})) | ||
}) | ||
default = { | ||
log_destination_type = "cloud-watch-logs" | ||
retention_in_days = 180 | ||
kms_key_id = null | ||
} | ||
default = "eu-west-1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.