From 508d5f569f0da55870f0ebe282ac0afe1f6ae9ae Mon Sep 17 00:00:00 2001 From: Novikov Sergey Date: Tue, 28 Sep 2021 14:22:57 +0200 Subject: [PATCH] Tf013update (#18) * Add providers an versions * Update Makefile and docs after removing obsolete parameter * Remove obsolete list function * Add lock file to .gitignore * Add CODEOWNERS * Add release drafter * Fix formatting --- .github/CODEOWNERS | 1 + .github/release-drafter.yml | 24 +++++++++++++++++++ .github/workflows/release-drafter.yml | 15 ++++++++++++ .gitignore | 3 +++ Makefile | 17 ++++++------- README.md | 18 +++++++++----- examples/satellite-all/README.md | 12 ++++++---- examples/satellite-all/main.tf | 3 +-- examples/satellite-all/variables.tf | 1 + .../satellite-default-route-all/README.md | 12 ++++++---- examples/satellite-default-route-all/main.tf | 3 +-- .../satellite-default-route-all/variables.tf | 1 + examples/satellite-default-route/README.md | 12 ++++++---- examples/satellite-default-route/main.tf | 3 +-- examples/satellite-default-route/variables.tf | 1 + examples/satellite/README.md | 12 ++++++---- examples/satellite/main.tf | 3 +-- examples/satellite/variables.tf | 1 + main.tf | 3 --- outputs.tf | 2 +- providers.tf | 2 ++ variables.tf | 4 ---- versions.tf | 9 +++++++ 23 files changed, 114 insertions(+), 48 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release-drafter.yml create mode 100644 providers.tf create mode 100644 versions.tf diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..ec25d53 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @Flaconi/devops diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..2ee7c07 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,24 @@ +# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter +name-template: '$NEXT_MINOR_VERSION 🌈' +tag-template: '$NEXT_MINOR_VERSION' +categories: + - title: '🚀 Features' + labels: + - feature + - enhancement + - title: '🐛 Bug Fixes' + labels: + - fix + - bugfix + - bug + - title: '🧰 Maintenance' + labels: + - chore + - dependencies +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +branches: + - master +template: | + ## What's Changed + + $CHANGES diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..e627dfd --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,15 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - master + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 97afa46..7209a04 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ *.tfstate *.tfstate.* +# Exclude the providers lock file introduced by TF0.14 +.terraform.lock.hcl + # Crash log files crash.log diff --git a/Makefile b/Makefile index 608f77c..d78912a 100644 --- a/Makefile +++ b/Makefile @@ -11,10 +11,10 @@ TF_MODULES = $(sort $(dir $(wildcard $(CURRENT_DIR)modules/*/))) # ------------------------------------------------------------------------------------------------- # Container versions # ------------------------------------------------------------------------------------------------- -TF_VERSION = light -TFDOCS_VERSION = 0.8.1-0.18 -FL_VERSION = 0.2 -JL_VERSION = latest-0.4 +TF_VERSION = 0.13.7 +TFDOCS_VERSION = 0.9.1-0.28 +FL_VERSION = 0.4 +JL_VERSION = 1.6.0-0.5 # ------------------------------------------------------------------------------------------------- @@ -79,12 +79,9 @@ test: _pull-tf echo "------------------------------------------------------------"; \ if docker run $$(tty -s && echo "-it" || echo) --rm -v "$(CURRENT_DIR):/t" --workdir "$${DOCKER_PATH}" hashicorp/terraform:$(TF_VERSION) \ init \ - -verify-plugins=true \ - -lock=false \ -upgrade=true \ -reconfigure \ -input=false \ - -get-plugins=true \ -get=true \ .; then \ echo "OK"; \ @@ -171,7 +168,7 @@ _gen-main: -e DELIM_START='$(DELIM_START)' \ -e DELIM_CLOSE='$(DELIM_CLOSE)' \ cytopia/terraform-docs:$(TFDOCS_VERSION) \ - terraform-docs-replace-012 $(TFDOCS_ARGS) md README.md; then \ + terraform-docs-replace $(TFDOCS_ARGS) md README.md; then \ echo "OK"; \ else \ echo "Failed"; \ @@ -190,7 +187,7 @@ _gen-examples: -e DELIM_START='$(DELIM_START)' \ -e DELIM_CLOSE='$(DELIM_CLOSE)' \ cytopia/terraform-docs:$(TFDOCS_VERSION) \ - terraform-docs-replace-012 $(TFDOCS_ARGS) md $${DOCKER_PATH}/README.md; then \ + terraform-docs-replace $(TFDOCS_ARGS) md $${DOCKER_PATH}/README.md; then \ echo "OK"; \ else \ echo "Failed"; \ @@ -210,7 +207,7 @@ _gen-modules: -e DELIM_START='$(DELIM_START)' \ -e DELIM_CLOSE='$(DELIM_CLOSE)' \ cytopia/terraform-docs:$(TFDOCS_VERSION) \ - terraform-docs-replace-012 $(TFDOCS_ARGS) md $${DOCKER_PATH}/README.md; then \ + terraform-docs-replace $(TFDOCS_ARGS) md $${DOCKER_PATH}/README.md; then \ echo "OK"; \ else \ echo "Failed"; \ diff --git a/README.md b/README.md index 5cc20a9..5091695 100644 --- a/README.md +++ b/README.md @@ -75,24 +75,30 @@ It is implied on [this][9] documentation page and they've been made aware of this fact. +## Requirements + +| Name | Version | +|------|---------| +| terraform | >= 0.13 | +| aws | >= 3 | + ## Providers | Name | Version | |------|---------| -| aws.hub | n/a | -| aws.satellite | n/a | +| aws.hub | >= 3 | +| aws.satellite | >= 3 | ## Inputs | Name | Description | Type | Default | Required | -|------|-------------|------|---------|:-----:| +|------|-------------|------|---------|:--------:| | aws\_account\_id\_hub | AWS account number containing the TGW hub | `string` | n/a | yes | -| aws\_login\_profile | Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles | `any` | n/a | yes | | role\_to\_assume\_hub | IAM role name to assume in the AWS account containing the TGW hub (eg. ASSUME-ROLE-HUB) | `string` | n/a | yes | -| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | aws\_account\_id\_satellite | AWS account number containing the TGW satellite | `string` | `""` | no | | hub\_destination\_cidr\_blocks | List of CIDRs to be routed for the hub | `list(string)` | `[]` | no | -| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | private\_subnets\_strict\_acl\_rules | Create additional ACLs for private subnets to restrict inbound traffic only to VPC itself and VPCs paired over TGW | `bool` | `false` | no | | ram\_resource\_association\_id | Identifier of the Resource Access Manager Resource Association | `string` | `""` | no | | role\_to\_assume\_satellite | IAM role name to assume in the AWS account containing the TGW satellite (eg. ASSUME-ROLE-SATELLITE) | `string` | `""` | no | diff --git a/examples/satellite-all/README.md b/examples/satellite-all/README.md index 7a0b610..beeeaa3 100644 --- a/examples/satellite-all/README.md +++ b/examples/satellite-all/README.md @@ -1,6 +1,10 @@ # Standalone invocation of the Transit Gateway satellite module +## Requirements + +No requirements. + ## Providers No provider. @@ -8,15 +12,15 @@ No provider. ## Inputs | Name | Description | Type | Default | Required | -|------|-------------|------|---------|:-----:| +|------|-------------|------|---------|:--------:| | aws\_account\_id\_hub | AWS account number containing the TGW hub | `string` | n/a | yes | | aws\_account\_id\_satellite | List of AWS account numbers representing the satellites of the TGW | `list(string)` | n/a | yes | -| aws\_login\_profile | Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles | `any` | n/a | yes | +| aws\_login\_profile | Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles | `string` | n/a | yes | | role\_to\_assume\_hub | IAM role name to assume in the AWS account containing the TGW hub (eg. ASSUME-ROLE-HUB) | `string` | n/a | yes | | role\_to\_assume\_satellite | IAM role name to assume in the AWS account containing the TGW satellite (eg. ASSUME-ROLE-SATELLITE) | `string` | n/a | yes | -| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | hub\_destination\_cidr\_blocks | List of CIDRs to be routed for the hub | `list(string)` | `[]` | no | -| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | route\_entire\_satellite\_vpc | Boolean flag for toggling the creation of network routes for all the subnets of the satellite VPC | `bool` | `false` | no | | route\_private\_subnets\_via\_tgw | Use TGW attachment as a default route (0.0.0.0/0) for private subnets. Value `satellite_destination_cidr_block`s will be ignored. | `bool` | `false` | no | | satellite\_create | Boolean flag for toggling the handling of satellite resources | `bool` | `false` | no | diff --git a/examples/satellite-all/main.tf b/examples/satellite-all/main.tf index 718621d..14cbc14 100644 --- a/examples/satellite-all/main.tf +++ b/examples/satellite-all/main.tf @@ -8,8 +8,7 @@ module "tgw-satellite-all" { aws.hub = aws.hub } - aws_login_profile = var.aws_login_profile - satellite_create = var.satellite_create + satellite_create = var.satellite_create aws_account_id_hub = var.aws_account_id_hub aws_account_id_satellite = local.aws_account_id_satellite diff --git a/examples/satellite-all/variables.tf b/examples/satellite-all/variables.tf index 3495404..465e718 100644 --- a/examples/satellite-all/variables.tf +++ b/examples/satellite-all/variables.tf @@ -6,6 +6,7 @@ variable "satellite_create" { variable "aws_login_profile" { description = "Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles" + type = string } variable "aws_account_id_hub" { diff --git a/examples/satellite-default-route-all/README.md b/examples/satellite-default-route-all/README.md index 7a0b610..beeeaa3 100644 --- a/examples/satellite-default-route-all/README.md +++ b/examples/satellite-default-route-all/README.md @@ -1,6 +1,10 @@ # Standalone invocation of the Transit Gateway satellite module +## Requirements + +No requirements. + ## Providers No provider. @@ -8,15 +12,15 @@ No provider. ## Inputs | Name | Description | Type | Default | Required | -|------|-------------|------|---------|:-----:| +|------|-------------|------|---------|:--------:| | aws\_account\_id\_hub | AWS account number containing the TGW hub | `string` | n/a | yes | | aws\_account\_id\_satellite | List of AWS account numbers representing the satellites of the TGW | `list(string)` | n/a | yes | -| aws\_login\_profile | Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles | `any` | n/a | yes | +| aws\_login\_profile | Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles | `string` | n/a | yes | | role\_to\_assume\_hub | IAM role name to assume in the AWS account containing the TGW hub (eg. ASSUME-ROLE-HUB) | `string` | n/a | yes | | role\_to\_assume\_satellite | IAM role name to assume in the AWS account containing the TGW satellite (eg. ASSUME-ROLE-SATELLITE) | `string` | n/a | yes | -| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | hub\_destination\_cidr\_blocks | List of CIDRs to be routed for the hub | `list(string)` | `[]` | no | -| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | route\_entire\_satellite\_vpc | Boolean flag for toggling the creation of network routes for all the subnets of the satellite VPC | `bool` | `false` | no | | route\_private\_subnets\_via\_tgw | Use TGW attachment as a default route (0.0.0.0/0) for private subnets. Value `satellite_destination_cidr_block`s will be ignored. | `bool` | `false` | no | | satellite\_create | Boolean flag for toggling the handling of satellite resources | `bool` | `false` | no | diff --git a/examples/satellite-default-route-all/main.tf b/examples/satellite-default-route-all/main.tf index db51eda..2173a10 100644 --- a/examples/satellite-default-route-all/main.tf +++ b/examples/satellite-default-route-all/main.tf @@ -8,8 +8,7 @@ module "tgw-satellite-default-route-all" { aws.hub = aws.hub } - aws_login_profile = var.aws_login_profile - satellite_create = var.satellite_create + satellite_create = var.satellite_create aws_account_id_hub = var.aws_account_id_hub aws_account_id_satellite = local.aws_account_id_satellite diff --git a/examples/satellite-default-route-all/variables.tf b/examples/satellite-default-route-all/variables.tf index 3495404..465e718 100644 --- a/examples/satellite-default-route-all/variables.tf +++ b/examples/satellite-default-route-all/variables.tf @@ -6,6 +6,7 @@ variable "satellite_create" { variable "aws_login_profile" { description = "Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles" + type = string } variable "aws_account_id_hub" { diff --git a/examples/satellite-default-route/README.md b/examples/satellite-default-route/README.md index 7a0b610..beeeaa3 100644 --- a/examples/satellite-default-route/README.md +++ b/examples/satellite-default-route/README.md @@ -1,6 +1,10 @@ # Standalone invocation of the Transit Gateway satellite module +## Requirements + +No requirements. + ## Providers No provider. @@ -8,15 +12,15 @@ No provider. ## Inputs | Name | Description | Type | Default | Required | -|------|-------------|------|---------|:-----:| +|------|-------------|------|---------|:--------:| | aws\_account\_id\_hub | AWS account number containing the TGW hub | `string` | n/a | yes | | aws\_account\_id\_satellite | List of AWS account numbers representing the satellites of the TGW | `list(string)` | n/a | yes | -| aws\_login\_profile | Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles | `any` | n/a | yes | +| aws\_login\_profile | Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles | `string` | n/a | yes | | role\_to\_assume\_hub | IAM role name to assume in the AWS account containing the TGW hub (eg. ASSUME-ROLE-HUB) | `string` | n/a | yes | | role\_to\_assume\_satellite | IAM role name to assume in the AWS account containing the TGW satellite (eg. ASSUME-ROLE-SATELLITE) | `string` | n/a | yes | -| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | hub\_destination\_cidr\_blocks | List of CIDRs to be routed for the hub | `list(string)` | `[]` | no | -| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | route\_entire\_satellite\_vpc | Boolean flag for toggling the creation of network routes for all the subnets of the satellite VPC | `bool` | `false` | no | | route\_private\_subnets\_via\_tgw | Use TGW attachment as a default route (0.0.0.0/0) for private subnets. Value `satellite_destination_cidr_block`s will be ignored. | `bool` | `false` | no | | satellite\_create | Boolean flag for toggling the handling of satellite resources | `bool` | `false` | no | diff --git a/examples/satellite-default-route/main.tf b/examples/satellite-default-route/main.tf index 5ade270..a35e35f 100644 --- a/examples/satellite-default-route/main.tf +++ b/examples/satellite-default-route/main.tf @@ -8,8 +8,7 @@ module "tgw-satellite-default-route" { aws.hub = aws.hub } - aws_login_profile = var.aws_login_profile - satellite_create = var.satellite_create + satellite_create = var.satellite_create aws_account_id_hub = var.aws_account_id_hub aws_account_id_satellite = local.aws_account_id_satellite diff --git a/examples/satellite-default-route/variables.tf b/examples/satellite-default-route/variables.tf index 3495404..465e718 100644 --- a/examples/satellite-default-route/variables.tf +++ b/examples/satellite-default-route/variables.tf @@ -6,6 +6,7 @@ variable "satellite_create" { variable "aws_login_profile" { description = "Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles" + type = string } variable "aws_account_id_hub" { diff --git a/examples/satellite/README.md b/examples/satellite/README.md index 1e9a49b..366075e 100644 --- a/examples/satellite/README.md +++ b/examples/satellite/README.md @@ -1,6 +1,10 @@ # Standalone invocation of the Transit Gateway satellite module +## Requirements + +No requirements. + ## Providers No provider. @@ -8,15 +12,15 @@ No provider. ## Inputs | Name | Description | Type | Default | Required | -|------|-------------|------|---------|:-----:| +|------|-------------|------|---------|:--------:| | aws\_account\_id\_hub | AWS account number containing the TGW hub | `string` | n/a | yes | | aws\_account\_id\_satellite | List of AWS account numbers representing the satellites of the TGW | `list(string)` | n/a | yes | -| aws\_login\_profile | Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles | `any` | n/a | yes | +| aws\_login\_profile | Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles | `string` | n/a | yes | | role\_to\_assume\_hub | IAM role name to assume in the AWS account containing the TGW hub (eg. ASSUME-ROLE-HUB) | `string` | n/a | yes | | role\_to\_assume\_satellite | IAM role name to assume in the AWS account containing the TGW satellite (eg. ASSUME-ROLE-SATELLITE) | `string` | n/a | yes | -| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| attachment\_subnet\_filters | List of maps selecting the subnet(s) where TGW will be attached |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | hub\_destination\_cidr\_blocks | List of CIDRs to be routed for the hub | `list(string)` | `[]` | no | -| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | +| private\_subnet\_filters | List of maps selecting the subnet(s) which are private |
list(object({
name = string
values = list(string)
}))
|
[
{
"name": "tag:Name",
"values": [
"*private*"
]
}
]
| no | | private\_subnets\_strict\_acl\_rules | Create additional ACLs for private subnets to restrict inbound traffic only to VPC itself and VPCs paired over TGW | `bool` | `false` | no | | route\_entire\_satellite\_vpc | Boolean flag for toggling the creation of network routes for all the subnets of the satellite VPC | `bool` | `false` | no | | route\_private\_subnets\_via\_tgw | Use TGW attachment as a default route (0.0.0.0/0) for private subnets. Value `satellite_destination_cidr_block`s will be ignored. | `bool` | `false` | no | diff --git a/examples/satellite/main.tf b/examples/satellite/main.tf index 31cb9ac..fa4b4fb 100644 --- a/examples/satellite/main.tf +++ b/examples/satellite/main.tf @@ -8,8 +8,7 @@ module "tgw-satellite" { aws.hub = aws.hub } - aws_login_profile = var.aws_login_profile - satellite_create = var.satellite_create + satellite_create = var.satellite_create aws_account_id_hub = var.aws_account_id_hub aws_account_id_satellite = local.aws_account_id_satellite diff --git a/examples/satellite/variables.tf b/examples/satellite/variables.tf index 970e269..13b62c1 100644 --- a/examples/satellite/variables.tf +++ b/examples/satellite/variables.tf @@ -6,6 +6,7 @@ variable "satellite_create" { variable "aws_login_profile" { description = "Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles" + type = string } variable "aws_account_id_hub" { diff --git a/main.tf b/main.tf index f91b136..54d3190 100644 --- a/main.tf +++ b/main.tf @@ -1,6 +1,3 @@ -provider "aws" { alias = "satellite" } -provider "aws" { alias = "hub" } - resource "aws_ec2_transit_gateway_vpc_attachment" "this" { provider = aws.satellite count = local.create ? 1 : 0 diff --git a/outputs.tf b/outputs.tf index aa9e073..f21562c 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,4 +1,4 @@ output "transit_gateway_vpc_attachment_id" { description = "Identifier of the Transit Gateway VPC Attachment" - value = element(concat(aws_ec2_transit_gateway_vpc_attachment.this.*.id, list("")), 0) + value = element(concat(aws_ec2_transit_gateway_vpc_attachment.this.*.id, []), 0) } diff --git a/providers.tf b/providers.tf new file mode 100644 index 0000000..16e5662 --- /dev/null +++ b/providers.tf @@ -0,0 +1,2 @@ +provider "aws" { alias = "satellite" } +provider "aws" { alias = "hub" } diff --git a/variables.tf b/variables.tf index d1b05a7..d2c8485 100644 --- a/variables.tf +++ b/variables.tf @@ -27,10 +27,6 @@ variable "aws_account_id_hub" { type = string } -variable "aws_login_profile" { - description = "Name of the AWS login profile as seen under ~/.aws/config used for assuming cross-account roles" -} - variable "role_to_assume_satellite" { description = "IAM role name to assume in the AWS account containing the TGW satellite (eg. ASSUME-ROLE-SATELLITE)" type = string diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..f0001a1 --- /dev/null +++ b/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 3" + } + } + required_version = ">= 0.13" +}