From 9bf6b472b8bfc680b702f5e20be869500027687d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?= <31509435+aleksasiriski@users.noreply.github.com> Date: Thu, 11 Apr 2024 12:52:49 +0200 Subject: [PATCH] fix(github): finally working assuming roles --- aws/dev/github/main.tf | 5 +---- aws/modules/github/role/variables.tf | 7 ++++--- aws/prod/github/main.tf | 5 +---- aws/shared/github/main.tf | 5 +---- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/aws/dev/github/main.tf b/aws/dev/github/main.tf index 282bd4e..ee19ecd 100644 --- a/aws/dev/github/main.tf +++ b/aws/dev/github/main.tf @@ -21,10 +21,7 @@ module "github_oidc" { module "github_backend_deploy" { source = "../../modules/github/role" - name = "github-auth-backend-deploy" - repository = "hearchco/hearchco" - scope = "event_type:deploy-backend" - + name = "github-auth-backend-deploy" statements = [ { actions = [ diff --git a/aws/modules/github/role/variables.tf b/aws/modules/github/role/variables.tf index 7e47349..1473513 100644 --- a/aws/modules/github/role/variables.tf +++ b/aws/modules/github/role/variables.tf @@ -14,13 +14,14 @@ variable "audience" { // "/" variable "repository" { - type = string + type = string + default = "hearchco/infra" } // to allow all branches use "ref:refs/heads/*", to allow everything from the repo use "*" -// for dispatched events use "event_type:" variable "scope" { - type = string + type = string + default = "*" } variable "statements" { diff --git a/aws/prod/github/main.tf b/aws/prod/github/main.tf index dc2e741..c66e5a5 100644 --- a/aws/prod/github/main.tf +++ b/aws/prod/github/main.tf @@ -21,10 +21,7 @@ module "github_oidc" { module "github_backend_deploy" { source = "../../modules/github/role" - name = "github-auth-backend-deploy" - repository = "hearchco/hearchco" - scope = "event_type:deploy-backend" - + name = "github-auth-backend-deploy" statements = [ { actions = [ diff --git a/aws/shared/github/main.tf b/aws/shared/github/main.tf index 3c3a644..42e48a4 100644 --- a/aws/shared/github/main.tf +++ b/aws/shared/github/main.tf @@ -21,10 +21,7 @@ module "github_oidc" { module "github_shared_tf_state" { source = "../../modules/github/role" - name = "github-auth-shared-tf-state" - repository = "hearchco/hearchco" - scope = "event_type:deploy-backend" - + name = "github-auth-shared-tf-state" statements = [ { actions = [