Skip to content

Commit

Permalink
Merge pull request #9 from pablo19sc/main
Browse files Browse the repository at this point in the history
provider update - removing experiments
  • Loading branch information
drewmullen authored Oct 21, 2022
2 parents 4135865 + 5cc4d0f commit 85866cb
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 23 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ Each Spoke VPC segment created is independent between each other, meaning that i

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.73.0 |
| <a name="requirement_awscc"></a> [awscc](#requirement\_awscc) | >= 0.15.0 |

Expand All @@ -380,8 +380,8 @@ Each Spoke VPC segment created is independent between each other, meaning that i

| Name | Source | Version |
|------|--------|---------|
| <a name="module_aws_network_firewall"></a> [aws\_network\_firewall](#module\_aws\_network\_firewall) | aws-ia/networkfirewall/aws | = 0.0.1 |
| <a name="module_central_vpcs"></a> [central\_vpcs](#module\_central\_vpcs) | aws-ia/vpc/aws | = 3.0.0 |
| <a name="module_aws_network_firewall"></a> [aws\_network\_firewall](#module\_aws\_network\_firewall) | aws-ia/networkfirewall/aws | = 0.0.2 |
| <a name="module_central_vpcs"></a> [central\_vpcs](#module\_central\_vpcs) | aws-ia/vpc/aws | = 3.0.1 |
| <a name="module_spoke_vpcs"></a> [spoke\_vpcs](#module\_spoke\_vpcs) | ./modules/spoke_vpcs | n/a |

## Resources
Expand Down Expand Up @@ -415,9 +415,9 @@ Each Spoke VPC segment created is independent between each other, meaning that i
|------|-------------|------|---------|:--------:|
| <a name="input_central_vpcs"></a> [central\_vpcs](#input\_central\_vpcs) | Configuration of the Central VPCs - used to centralized different services. You can create the following central VPCs: "inspection", "egress", "shared-services", "hybrid-dns", and "ingress".<br>In each Central VPC, You can specify the following attributes:<br>- `vpc_id` = (Optional\|string) **If you specify this value, no other attributes can be set** VPC ID, the VPC will be attached to the Transit Gateway, and its attachment associate/propagated to the corresponding TGW Route Tables.<br>- `cidr_block` = (Optional\|string) CIDR range to assign to the VPC if creating a new VPC.<br>- `az_count` = (Optional\|number) Searches the number of AZs in the region and takes a slice based on this number - the slice is sorted a-z.<br>- `vpc_enable_dns_hostnames` = (Optional\|bool) Indicates whether the instances launched in the VPC get DNS hostnames. Enabled by default.<br>- `vpc_enable_dns_support` = (Optional\|bool) Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default.<br>- `vpc_instance_tenancy` = (Optional\|string) The allowed tenancy of instances launched into the VPC.<br>- `vpc_flow_logs` = (Optional\|object(any)) Configuration of the VPC Flow Logs of the VPC configured. Options: "cloudwatch", "s3", "none".<br>- `subnet_configuration` = (Optional\|any) Configuration of the subnets to create in the VPC. Depending the type of central VPC to create, the format (subnets to configure) will be different.<br>To get more information of the format of the variables, check the section "Central VPCs" in the README.<pre></pre> | `any` | n/a | yes |
| <a name="input_identifier"></a> [identifier](#input\_identifier) | String to identify the whole Hub and Spoke environment. | `string` | n/a | yes |
| <a name="input_network_definition"></a> [network\_definition](#input\_network\_definition) | "Definition of the IPv4 CIDR configuration. The definition is done by using two variables:"<br> - `type` = (string) Defines the type of network definition provided. It has to be either `CIDR` (Supernet's CIDR Block) or `PREFIX_LIST` (prefix list ID containing all the CIDR blocks of the network)<br> - `value` = (string) Either a Supernet's CIDR Block or a prefix list ID. This value needs to be consistent with the `type` provided in this variable.<pre></pre> | <pre>object({<br> type = string<br> value = string<br> })</pre> | n/a | yes |
| <a name="input_spoke_vpcs"></a> [spoke\_vpcs](#input\_spoke\_vpcs) | Variable is used to provide the Hub and Spoke module the neccessary information about the Spoke VPCs created. Within this variable, a map of routing domains is expected. The *key* of each map will defined that specific routing domain (e.g. prod, nonprod, etc.) and a Transit Gateway Route Table for that routing domain will be created. Inside each routing domain definition, you can define a map of VPCs with the following attributes:<br> - `vpc_id` = (Optional\|string) VPC ID. *This value is not used in this version of the module, we keep it as placehoder when adding support for centralized VPC endpoints*.<br> - `transit_gateway_attachment_id` = (Optional\|string) Transit Gateway VPC attachment ID.<br>To get more information of the format of the variables, check the section "Spoke VPCs" in the README.<pre></pre> | `any` | `null` | no |
| <a name="input_transit_gateway_attributes"></a> [transit\_gateway\_attributes](#input\_transit\_gateway\_attributes) | Attributes about the new Transit Gateway to create. **If you specify this value, transit\_gateway\_id can't be set**:<br>- `name` = (Optional\|string) Name to apply to the new Transit Gateway.<br>- `description` = (Optional\|string) Description of the Transit Gateway<br>- `amazon_side_asn` = (Optional\|number) Private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is `64512` to `65534` for 16-bit ASNs and `4200000000` to `4294967294` for 32-bit ASNs. It is recommended to configure one to avoid ASN overlap. Default value: `64512`.<br>- `auto_accept_shared_attachments` = (Optional\|string) Wheter the attachment requests are automatically accepted. Valid values: `disable` (default) or `enable`.<br>- `dns_support` = (Optional\|string) Wheter DNS support is enabled. Valid values: `disable` or `enable` (default).<br>- `multicast_support` = (Optional\|string) Wheter Multicas support is enabled. Valid values: `disable` (default) or `enable`.<br>- `transit_gateway_cidr_blocks` = (Optional\|list(string)) One or more IPv4/IPv6 CIDR blocks for the Transit Gateway. Must be a size /24 for IPv4 CIDRs, and /64 for IPv6 CIDRs.<br>- `vpn_ecmp_support` = (Optional\|string) Whever VPN ECMP support is enabled. Valid values: `disable` or `enable` (default).<br>- `tags` = (Optional\|map(string)) Key-value tags to apply to the Transit Gateway.<pre></pre> | `any` | `null` | no |
| <a name="input_network_definition"></a> [network\_definition](#input\_network\_definition) | "Definition of the IPv4 CIDR configuration. The definition is done by using two variables:"<br> - `type` = (string) Defines the type of network definition provided. It has to be either `CIDR` (Supernet's CIDR Block) or `PREFIX_LIST` (prefix list ID containing all the CIDR blocks of the network)<br> - `value` = (string) Either a Supernet's CIDR Block or a prefix list ID. This value needs to be consistent with the `type` provided in this variable.<pre></pre> | <pre>object({<br> type = string<br> value = string<br> })</pre> | n/a | yes |
| <a name="input_spoke_vpcs"></a> [spoke\_vpcs](#input\_spoke\_vpcs) | Variable is used to provide the Hub and Spoke module the neccessary information about the Spoke VPCs created. Within this variable, a map of routing domains is expected. The *key* of each map will defined that specific routing domain (e.g. prod, nonprod, etc.) and a Transit Gateway Route Table for that routing domain will be created. Inside each routing domain definition, you can define a map of VPCs with the following attributes:<br> - `vpc_id` = (Optional\|string) VPC ID. *This value is not used in this version of the module, we keep it as placehoder when adding support for centralized VPC endpoints*.<br> - `transit_gateway_attachment_id` = (Optional\|string) Transit Gateway VPC attachment ID.<br>To get more information of the format of the variables, check the section "Spoke VPCs" in the README.<pre></pre> | `any` | `{}` | no |
| <a name="input_transit_gateway_attributes"></a> [transit\_gateway\_attributes](#input\_transit\_gateway\_attributes) | Attributes about the new Transit Gateway to create. **If you specify this value, transit\_gateway\_id can't be set**:<br>- `name` = (Optional\|string) Name to apply to the new Transit Gateway.<br>- `description` = (Optional\|string) Description of the Transit Gateway<br>- `amazon_side_asn` = (Optional\|number) Private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is `64512` to `65534` for 16-bit ASNs and `4200000000` to `4294967294` for 32-bit ASNs. It is recommended to configure one to avoid ASN overlap. Default value: `64512`.<br>- `auto_accept_shared_attachments` = (Optional\|string) Wheter the attachment requests are automatically accepted. Valid values: `disable` (default) or `enable`.<br>- `dns_support` = (Optional\|string) Wheter DNS support is enabled. Valid values: `disable` or `enable` (default).<br>- `multicast_support` = (Optional\|string) Wheter Multicas support is enabled. Valid values: `disable` (default) or `enable`.<br>- `transit_gateway_cidr_blocks` = (Optional\|list(string)) One or more IPv4/IPv6 CIDR blocks for the Transit Gateway. Must be a size /24 for IPv4 CIDRs, and /64 for IPv6 CIDRs.<br>- `vpn_ecmp_support` = (Optional\|string) Whever VPN ECMP support is enabled. Valid values: `disable` or `enable` (default).<br>- `tags` = (Optional\|map(string)) Key-value tags to apply to the Transit Gateway.<pre></pre> | `any` | `{}` | no |
| <a name="input_transit_gateway_id"></a> [transit\_gateway\_id](#input\_transit\_gateway\_id) | Transit Gateway ID. **If you specify this value, transit\_gateway\_attributes can't be set**. | `string` | `null` | no |

## Outputs
Expand Down
3 changes: 2 additions & 1 deletion examples/central_egress_ingress/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ resource "aws_ec2_transit_gateway" "tgw" {

# Hub and Spoke module - we only centralize the Egress and Ingress traffic
module "hub-and-spoke" {
source = "../.."
source = "aws-ia/network-hubandspoke"
version = "1.0.1"

identifier = var.identifier
transit_gateway_id = aws_ec2_transit_gateway.tgw.id
Expand Down
4 changes: 1 addition & 3 deletions examples/central_egress_ingress/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# --- examples/central_egress_ingress/providers.tf ---

terraform {
required_version = ">= 1.3.0"
required_providers {
aws = {
source = "hashicorp/aws"
Expand All @@ -14,9 +15,6 @@ terraform {
version = ">= 0.15.0"
}
}

required_version = ">= 0.15.0"
experiments = [module_variable_optional_attrs]
}

# AWS Providers configuration - AWS Region indicated in root/variables.tf
Expand Down
3 changes: 2 additions & 1 deletion examples/central_inspection/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

# Hub and Spoke module - we only centralize the Inspection
module "hub-and-spoke" {
source = "../.."
source = "aws-ia/network-hubandspoke"
version = "1.0.1"

identifier = var.identifier
transit_gateway_attributes = {
Expand Down
4 changes: 1 addition & 3 deletions examples/central_inspection/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# --- examples/central_inspection/providers.tf ---

terraform {
required_version = ">= 1.3.0"
required_providers {
aws = {
source = "hashicorp/aws"
Expand All @@ -14,9 +15,6 @@ terraform {
version = ">= 0.15.0"
}
}

required_version = ">= 0.15.0"
experiments = [module_variable_optional_attrs]
}

# AWS Providers configuration - AWS Region indicated in root/variables.tf
Expand Down
3 changes: 2 additions & 1 deletion examples/central_shared_services/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ resource "aws_ec2_transit_gateway" "tgw" {

# Hub and Spoke module - we only centralize the Shared Services and Hybrid DNS VPCs
module "hub-and-spoke" {
source = "../.."
source = "aws-ia/network-hubandspoke"
version = "1.0.1"

identifier = var.identifier
transit_gateway_id = aws_ec2_transit_gateway.tgw.id
Expand Down
4 changes: 1 addition & 3 deletions examples/central_shared_services/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# --- examples/central_shared_services/providers.tf ---

terraform {
required_version = ">= 1.3.0"
required_providers {
aws = {
source = "hashicorp/aws"
Expand All @@ -14,9 +15,6 @@ terraform {
version = ">= 0.15.0"
}
}

required_version = ">= 0.15.0"
experiments = [module_variable_optional_attrs]
}

# AWS Providers configuration - AWS Region indicated in root/variables.tf
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module "central_vpcs" {
for_each = var.central_vpcs

source = "aws-ia/vpc/aws"
version = "= 3.0.0"
version = "= 3.0.1"

name = try(each.value.name, each.key)
vpc_id = try(each.value.vpc_id, null)
Expand Down Expand Up @@ -268,7 +268,7 @@ module "aws_network_firewall" {
count = local.create_anfw ? 1 : 0

source = "aws-ia/networkfirewall/aws"
version = "= 0.0.1"
version = "= 0.0.2"

network_firewall_name = var.central_vpcs.inspection.aws_network_firewall.name
network_firewall_policy = var.central_vpcs.inspection.aws_network_firewall.policy_arn
Expand Down
4 changes: 1 addition & 3 deletions providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# --- root/providers.tf ---

terraform {
required_version = ">= 1.3.0"
required_providers {
aws = {
source = "hashicorp/aws"
Expand All @@ -14,7 +15,4 @@ terraform {
version = ">= 0.15.0"
}
}

required_version = ">= 0.15.0"
experiments = [module_variable_optional_attrs]
}

0 comments on commit 85866cb

Please sign in to comment.