From 8ab218f691238666a257ae7f4990379365f98eea Mon Sep 17 00:00:00 2001 From: AWS Date: Tue, 16 Apr 2024 22:59:01 +0000 Subject: [PATCH] Release: 1.12.1 --- README.md | 4 +++- VERSION | 2 +- data.tf | 18 +++++++++++++++++- versions.tf | 2 +- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c339ec71..1f38279c 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ As of version 1.6.0, AFT collects anonymous operational metrics to help AWS impr | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0.0, < 2.0.0 | +| [terraform](#requirement\_terraform) | >= 1.2.0, < 2.0.0 | | [aws](#requirement\_aws) | >= 5.11.0, < 6.0.0 | ## Providers @@ -93,6 +93,8 @@ As of version 1.6.0, AFT collects anonymous operational metrics to help AWS impr | Name | Type | |------|------| | [aws_partition.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source | +| [aws_service.home_region_validation](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/service) | data source | +| [aws_ssm_parameters_by_path.servicecatalog_regional_data](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameters_by_path) | data source | | [local_file.python_version](https://registry.terraform.io/providers/hashicorp/local/latest/docs/data-sources/file) | data source | | [local_file.version](https://registry.terraform.io/providers/hashicorp/local/latest/docs/data-sources/file) | data source | diff --git a/VERSION b/VERSION index 0eed1a29..f8f4f03b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.12.0 +1.12.1 diff --git a/data.tf b/data.tf index c603631c..10c0bc7c 100644 --- a/data.tf +++ b/data.tf @@ -9,4 +9,20 @@ data "local_file" "python_version" { filename = "${path.module}/PYTHON_VERSION" } -data "aws_partition" "current" {} +data "aws_ssm_parameters_by_path" "servicecatalog_regional_data" { + count = data.aws_partition.current.partition == "aws" ? 1 : 0 + path = "/aws/service/global-infrastructure/services/servicecatalog/regions" +} + +data "aws_service" "home_region_validation" { + service_id = "controltower" + lifecycle { + precondition { + condition = try(contains(data.aws_ssm_parameters_by_path.servicecatalog_regional_data[0].values, var.ct_home_region), true) == true + error_message = "AFT is not supported on Control Tower home region ${var.ct_home_region}. Refer to https://docs.aws.amazon.com/controltower/latest/userguide/limits.html for more information." + } + } +} + +data "aws_partition" "current" { +} diff --git a/versions.tf b/versions.tf index abebb4e5..723ecd7f 100644 --- a/versions.tf +++ b/versions.tf @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # terraform { - required_version = ">= 1.0.0, < 2.0.0" + required_version = ">= 1.2.0, < 2.0.0" required_providers { aws = {