Skip to content

Commit

Permalink
test move providers
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed Dec 19, 2024
1 parent d167707 commit 1ce02d2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
6 changes: 0 additions & 6 deletions terraform/modules/repo_access/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ variable "access" {
}))
}

variable "owner" {
description = "The owner of the GitHub repository (organization or user)"
type = string
default = "birki-sandbox"
}

resource "github_team_repository" "repo_access" {
for_each = { for team in var.access : team.team => team }
repository = var.repo
Expand Down
4 changes: 4 additions & 0 deletions terraform/modules/repo_access/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
provider "github" {
token = var.GITHUB_TOKEN
owner = var.OWNER
}
13 changes: 13 additions & 0 deletions terraform/modules/repo_access/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
variable "GITHUB_TOKEN" {
description = "A GitHub API token"
type = string
sensitive = true
default = ""
}

variable "OWNER" {
description = "The owner / organization"
type = string
sensitive = false
default = "birki-sandbox"
}
5 changes: 0 additions & 5 deletions terraform/provider.tf → terraform/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,3 @@ terraform {
}
}
}

provider "github" {
token = var.GITHUB_TOKEN
owner = var.OWNER
}
12 changes: 0 additions & 12 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,12 +0,0 @@
variable "GITHUB_TOKEN" {
description = "A GitHub API token"
type = string
sensitive = true
}

variable "OWNER" {
description = "The owner / organization"
type = string
sensitive = false
default = "birki-sandbox"
}

0 comments on commit 1ce02d2

Please sign in to comment.