Skip to content

Commit 58ba8b1

Browse files
authored
Merge pull request #70 from hackforla/iam/oidc-add-gha-thumbprint
use dynamic data pull for GHA cert thumbprint
2 parents ace1d83 + 226e47f commit 58ba8b1

File tree

1 file changed

+5
-1
lines changed
  • terraform/modules/aws-gha-oidc-providers

1 file changed

+5
-1
lines changed

terraform/modules/aws-gha-oidc-providers/main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,18 @@ locals {
3939

4040
data "aws_caller_identity" "current" {}
4141

42+
data "tls_certificate" "github_actions" {
43+
url = "https://${local.oidc_github_idp}"
44+
}
45+
4246
resource "aws_iam_openid_connect_provider" "github_actions" {
4347
url = "https://${local.oidc_github_idp}"
4448

4549
client_id_list = [
4650
local.oidc_aws_audience
4751
]
4852

49-
thumbprint_list = ["1b511abead59c6ce207077c0bf0e0043b1382612"]
53+
thumbprint_list = [data.tls_certificate.github_actions.certificates[0].sha1_fingerprint]
5054
}
5155

5256
resource "aws_iam_role" "github_actions_oidc" {

0 commit comments

Comments
 (0)