-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path0-providers.tf
83 lines (74 loc) · 1.81 KB
/
0-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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# Copyright Amazon.com, Inc. and its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License. See the LICENSE accompanying this file
# for the specific language governing permissions and limitations under
# the License.
#
#master accounr
provider "aws" {
region = var.master_region
}
#network firewall admin account - Global scope
provider "aws" {
region = "us-east-1"
alias = "global"
assume_role {
role_arn = "arn:aws:iam::{network firewall admin account}:role/{role}" #customize
external_id = "my_external_id"
}
}
#network firewall admin account - Regional scope
provider "aws" {
region = var.application_region
alias = "regional"
assume_role {
role_arn = "arn:aws:iam::{network firewall admin account}:role/{role}" #customize
external_id = "my_external_id"
}
}
#logging account
provider "aws" {
region = var.application_region
alias = "logging"
assume_role {
role_arn = "arn:aws:iam::{logging account}:role/{role}" #customize
external_id = "my_external_id"
}
}
#logging account
provider "aws" {
region = "us-east-1"
alias = "logging-global"
assume_role {
role_arn = "arn:aws:iam::215097317823:role/{role}" #customize
external_id = "my_external_id"
}
}
#For testing purposes...
provider "aws" {
region = var.application_region
alias = "dev"
assume_role {
role_arn = "arn:aws:iam::299537{logging account}281981:role/{role}"
external_id = "my_external_id"
}
}
#For testing purposes...
provider "aws" {
region = var.application_region
alias = "preprod"
assume_role {
role_arn = "arn:aws:iam::{pre prod account}:role/{role}"
external_id = "my_external_id"
}
}
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.63.0"
}
}
}