diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 63b3026..b49e513 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.2 +current_version = 2.0.0 commit = True message = Bumps version to {new_version} tag = False diff --git a/CHANGELOG.md b/CHANGELOG.md index 01d87d5..e9c687c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,24 @@ -## terraform-aws-tardigrade-transit-gateway-attachment Change Log +## terraform-aws-tardigrade-transit-gateway Change Log All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +### 2.0.0 + +**Commit Delta**: [Change from 1.0.2 release](https://github.com/plus3it/terraform-aws-tardigrade-transit-gateway/compare/1.0.2..2.0.0) + +**Released**: 2021.12.29 + +**Summary**: + +* Removes variables in cross-account-vpc-attachment module that were used to + create a dependency so the attachment would succeed. These variables are no + longer needed, presumably due to new retry functionality in the AWS provider. +* Uses `configuration_aliases` instead of empty provider blocks. +* Bumps minimum terraform version to 0.15 for the cross-account and cross-region + modules. + ### 0.0.0 **Commit Delta**: N/A diff --git a/modules/cross-account-vpc-attachment/README.md b/modules/cross-account-vpc-attachment/README.md index f384e0e..aaab3b5 100644 --- a/modules/cross-account-vpc-attachment/README.md +++ b/modules/cross-account-vpc-attachment/README.md @@ -7,7 +7,7 @@ Terraform module for managing a cross-account Transit Gateway VPC Attachment. | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 0.13 | +| [terraform](#requirement\_terraform) | >= 0.15 | | [aws](#requirement\_aws) | >= 3.0 | ## Providers @@ -26,8 +26,6 @@ Terraform module for managing a cross-account Transit Gateway VPC Attachment. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [ram\_resource\_association\_id](#input\_ram\_resource\_association\_id) | ID of the RAM resource association for the Transit Gateway | `string` | n/a | yes | -| [ram\_share\_id](#input\_ram\_share\_id) | ID of the RAM Share associated with the Transit Gateway | `string` | n/a | yes | | [subnet\_ids](#input\_subnet\_ids) | List of subnets to associate with the VPC attachment | `list(string)` | n/a | yes | | [transit\_gateway\_id](#input\_transit\_gateway\_id) | ID of the Transit Gateway | `string` | n/a | yes | | [dns\_support](#input\_dns\_support) | Whether DNS support is enabled. Valid values: disable, enable. | `string` | `"enable"` | no | diff --git a/modules/cross-account-vpc-attachment/main.tf b/modules/cross-account-vpc-attachment/main.tf index 76209c2..8fd43fd 100644 --- a/modules/cross-account-vpc-attachment/main.tf +++ b/modules/cross-account-vpc-attachment/main.tf @@ -1,7 +1,3 @@ -provider "aws" { - alias = "owner" -} - module "vpc_attachment" { source = "../vpc-attachment" @@ -10,15 +6,8 @@ module "vpc_attachment" { cross_account = true dns_support = var.dns_support ipv6_support = var.ipv6_support + tags = var.tags vpc_routes = [for route in var.vpc_routes : route if route.provider == "aws"] - - tags = merge( - { - ram_share_id = var.ram_share_id - ram_resource_association_id = var.ram_resource_association_id - }, - var.tags, - ) } module "vpc_accepter" { diff --git a/modules/cross-account-vpc-attachment/variables.tf b/modules/cross-account-vpc-attachment/variables.tf index a320af8..495670a 100644 --- a/modules/cross-account-vpc-attachment/variables.tf +++ b/modules/cross-account-vpc-attachment/variables.tf @@ -1,13 +1,3 @@ -variable "ram_share_id" { - description = "ID of the RAM Share associated with the Transit Gateway" - type = string -} - -variable "ram_resource_association_id" { - description = "ID of the RAM resource association for the Transit Gateway" - type = string -} - variable "subnet_ids" { description = "List of subnets to associate with the VPC attachment" type = list(string) diff --git a/modules/cross-account-vpc-attachment/versions.tf b/modules/cross-account-vpc-attachment/versions.tf index 34260e6..9e4b3e9 100644 --- a/modules/cross-account-vpc-attachment/versions.tf +++ b/modules/cross-account-vpc-attachment/versions.tf @@ -1,10 +1,14 @@ terraform { - required_version = ">= 0.13" + required_version = ">= 0.15" required_providers { aws = { source = "hashicorp/aws" version = ">= 3.0" + + configuration_aliases = [ + aws.owner + ] } } } diff --git a/modules/cross-region-peering-attachment/README.md b/modules/cross-region-peering-attachment/README.md index 8d3a3fa..8dc45a1 100644 --- a/modules/cross-region-peering-attachment/README.md +++ b/modules/cross-region-peering-attachment/README.md @@ -8,7 +8,7 @@ may be the same or different accounts, but must be different regions. | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 0.13 | +| [terraform](#requirement\_terraform) | >= 0.15 | | [aws](#requirement\_aws) | >= 3.0 | ## Providers diff --git a/modules/cross-region-peering-attachment/main.tf b/modules/cross-region-peering-attachment/main.tf index dc3e715..c27db87 100644 --- a/modules/cross-region-peering-attachment/main.tf +++ b/modules/cross-region-peering-attachment/main.tf @@ -1,7 +1,3 @@ -provider "aws" { - alias = "peer" -} - module "peering_attachment" { source = "../peering-attachment" diff --git a/modules/cross-region-peering-attachment/versions.tf b/modules/cross-region-peering-attachment/versions.tf index 34260e6..98c5fc6 100644 --- a/modules/cross-region-peering-attachment/versions.tf +++ b/modules/cross-region-peering-attachment/versions.tf @@ -1,10 +1,14 @@ terraform { - required_version = ">= 0.13" + required_version = ">= 0.15" required_providers { aws = { source = "hashicorp/aws" version = ">= 3.0" + + configuration_aliases = [ + aws.peer + ] } } } diff --git a/tests/cross-account-vpc-attachment/main.tf b/tests/cross-account-vpc-attachment/main.tf index 5beea52..85f4ae8 100644 --- a/tests/cross-account-vpc-attachment/main.tf +++ b/tests/cross-account-vpc-attachment/main.tf @@ -1,12 +1,24 @@ provider "aws" { region = "us-east-1" - profile = "resource-member" + profile = "aws" + + default_tags { + tags = { + TARDIGRADE_TEST = true + } + } } provider "aws" { region = "us-east-1" alias = "owner" - profile = "resource-owner" + profile = "awsalternate" + + default_tags { + tags = { + TARDIGRADE_TEST = true + } + } } module "vpc_attachment" { @@ -17,9 +29,6 @@ module "vpc_attachment" { aws.owner = aws.owner } - ram_share_id = module.ram_share_accepter.share_accepter.share_id - ram_resource_association_id = module.ram_share.resource_associations["tardigrade-tgw"].resource_association.id - subnet_ids = module.vpc_member.private_subnets transit_gateway_id = module.tgw.transit_gateway.id routes = local.routes diff --git a/tests/cross-region-peering-attachment/main.tf b/tests/cross-region-peering-attachment/main.tf index 3dcca0d..8e3c7cb 100644 --- a/tests/cross-region-peering-attachment/main.tf +++ b/tests/cross-region-peering-attachment/main.tf @@ -1,12 +1,12 @@ provider "aws" { region = "us-east-1" - profile = "resource-member" + profile = "aws" } provider "aws" { region = "us-east-2" alias = "peer" - profile = "resource-owner" + profile = "awsalternate" } module "peering_attachment" { diff --git a/tests/tgw/main.tf b/tests/tgw/main.tf index e662189..3839375 100644 --- a/tests/tgw/main.tf +++ b/tests/tgw/main.tf @@ -1,5 +1,6 @@ provider "aws" { - region = "us-east-1" + region = "us-east-1" + profile = "aws" } module "tgw" {