File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ data "aws_iam_policy_document" "assume_role" {
33
33
condition {
34
34
test = " StringEquals"
35
35
values = var. additional_audiences != null ? concat (
36
- [format ( " sts.%v " , local. dns_suffix ) ],
36
+ [local . audience ],
37
37
var. additional_audiences ,
38
- ) : [format ( " sts.%v " , local. dns_suffix ) ]
38
+ ) : [local . audience ]
39
39
variable = " token.actions.githubusercontent.com:aud"
40
40
}
41
41
Original file line number Diff line number Diff line change 13
13
// limitations under the License.
14
14
15
15
locals {
16
+ audience = format (" sts.%v" , local. dns_suffix )
16
17
github_organizations = toset ([
17
18
for repo in var . github_repositories : split (" /" , repo)[0 ]
18
19
])
19
20
dns_suffix = data. aws_partition . current . dns_suffix
20
21
oidc_provider_arn = var. enabled ? (var. create_oidc_provider ? aws_iam_openid_connect_provider. github [0 ]. arn : data. aws_iam_openid_connect_provider . github [0 ]. arn ) : " "
21
22
partition = data. aws_partition . current . partition
22
- sts_domain = format (" sts.%v" , local. dns_suffix )
23
23
}
24
24
25
25
resource "aws_iam_role" "github" {
@@ -69,7 +69,7 @@ resource "aws_iam_openid_connect_provider" "github" {
69
69
70
70
client_id_list = concat (
71
71
[for org in local . github_organizations : " https://github.com/${ org } " ],
72
- [local . sts_domain ],
72
+ [local . audience ],
73
73
)
74
74
75
75
tags = var. tags
You can’t perform that action at this time.
0 commit comments