generated from aws-ia/.github
-
Notifications
You must be signed in to change notification settings - Fork 446
/
data.tf
28 lines (24 loc) · 975 Bytes
/
data.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright Amazon.com, Inc. or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
data "local_file" "version" {
filename = "${path.module}/VERSION"
}
data "local_file" "python_version" {
filename = "${path.module}/PYTHON_VERSION"
}
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" {
}