Skip to content

Commit

Permalink
fix(github): finally working assuming roles
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksasiriski committed Apr 11, 2024
1 parent 2c777d8 commit 9bf6b47
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
5 changes: 1 addition & 4 deletions aws/dev/github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
7 changes: 4 additions & 3 deletions aws/modules/github/role/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ variable "audience" {

// "<org_name>/<repo_name>"
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:<event_type_name>"
variable "scope" {
type = string
type = string
default = "*"
}

variable "statements" {
Expand Down
5 changes: 1 addition & 4 deletions aws/prod/github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
5 changes: 1 addition & 4 deletions aws/shared/github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 9bf6b47

Please sign in to comment.