-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproviders.tf
48 lines (45 loc) · 1.26 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
# This is the "default" provider that is used to obtain the caller's
# credentials, which are used to set the session name when assuming roles in
# the other providers.
provider "aws" {
default_tags {
tags = var.tags
}
region = var.aws_region
}
# The provider used to create resources inside the Shared Services account.
provider "aws" {
alias = "sharedservicesprovisionaccount"
assume_role {
role_arn = data.terraform_remote_state.sharedservices.outputs.provisionaccount_role.arn
session_name = local.caller_user_name
}
default_tags {
tags = var.tags
}
region = var.aws_region
}
# The provider used to create resources inside the Users account.
provider "aws" {
alias = "usersprovisionaccount"
assume_role {
role_arn = data.terraform_remote_state.users.outputs.provisionaccount_role.arn
session_name = local.caller_user_name
}
default_tags {
tags = var.tags
}
region = var.aws_region
}
# The provider used to lookup account IDs. Used in locals.tf.
provider "aws" {
alias = "organizationsreadonly"
assume_role {
role_arn = data.terraform_remote_state.master.outputs.organizationsreadonly_role.arn
session_name = local.caller_user_name
}
default_tags {
tags = var.tags
}
region = var.aws_region
}