-
Notifications
You must be signed in to change notification settings - Fork 2
/
providers.tf
53 lines (52 loc) · 1.33 KB
/
providers.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright Amazon.com, Inc. or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
provider "aws" {
alias = "ct_management"
region = var.ct_home_region
# The default profile or environment variables should authenticate to the Control Tower Management Account as Administrator
default_tags {
tags = {
managed_by = "AFT"
}
}
}
provider "aws" {
alias = "aft_management"
region = var.ct_home_region
assume_role {
role_arn = "arn:${data.aws_partition.current.partition}:iam::${var.aft_management_account_id}:role/AWSControlTowerExecution"
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
}
}
provider "aws" {
alias = "audit"
region = var.ct_home_region
assume_role {
role_arn = "arn:${data.aws_partition.current.partition}:iam::${var.audit_account_id}:role/AWSControlTowerExecution"
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
}
}
provider "aws" {
alias = "log_archive"
region = var.ct_home_region
assume_role {
role_arn = "arn:${data.aws_partition.current.partition}:iam::${var.log_archive_account_id}:role/AWSControlTowerExecution"
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
}
}