Skip to content

Commit

Permalink
Merge pull request #40 from hearchco/as/feat/github-oidc
Browse files Browse the repository at this point in the history
feat: github oidc
  • Loading branch information
aleksasiriski authored Aug 19, 2024
2 parents 2079540 + 7c7182f commit 01eebc9
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 2 deletions.
20 changes: 20 additions & 0 deletions live/dev/github-oidc/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions live/dev/github-oidc/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
include "root" {
path = find_in_parent_folders()
expose = true
}

terraform {
source = "${path_relative_from_include()}/../..//stacks/github-oidc"
}

locals {
aws_profile = include.root.locals.aws_profile
environment = include.root.locals.environment
domain_name = include.root.locals.domain_name
}

inputs = {}
20 changes: 20 additions & 0 deletions live/prod/github-oidc/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions live/prod/github-oidc/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
include "root" {
path = find_in_parent_folders()
expose = true
}

terraform {
source = "${path_relative_from_include()}/../..//stacks/github-oidc"
}

locals {
aws_profile = include.root.locals.aws_profile
environment = include.root.locals.environment
domain_name = include.root.locals.domain_name
}

inputs = {}
4 changes: 2 additions & 2 deletions stacks/github-oidc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module "github_oidc" {
module "github_oidc_infra_deploy_role" {
source = "../../modules/oidc-iam-role"

name = "github-auth-tf-state-lock"
repository = "hearchco/infra"
name = var.name
repository = var.repository
scope = var.scope
statements = var.statements
}
12 changes: 12 additions & 0 deletions stacks/github-oidc/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
variable "name" {
description = "The name of the IAM role"
type = string
default = "github-oidc-auth-role"
}

variable "repository" {
description = "The GitHub repository to grant access to"
type = string
default = "hearchco/infra"
}

variable "scope" {
description = "The scope of the access, e.g. 'ref:refs/heads/main', 'ref:refs/heads/*' or '*'"
type = string
Expand Down

0 comments on commit 01eebc9

Please sign in to comment.