Skip to content

Commit

Permalink
chore: Update Terraform provider version for GitHub to >= 6.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Arnold committed Aug 21, 2024
1 parent 43aa05e commit 73edcf4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Terraform"

on:
workflow_dispatch:
pull_request:

jobs:
terraform:
uses: HappyPathway/centralized-actions/.github/workflows/terraform.yml@main
with:
terraform_version: 1.9.1
terraform_api: app.terraform.io
github_username: djaboxx
github_email: git@roknsound.com
secrets:
TFE_TOKEN: ${{ secrets.TFE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion github_repo.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ locals {
repo_name = var.force_name ? var.name : "${var.name}-${formatdate("YYYYMMDD", timestamp())}"
}
resource "github_repository" "repo" {
name = local.repo_name
description = var.github_repo_description
Expand All @@ -10,7 +11,7 @@ resource "github_repository" "repo" {
allow_merge_commit = var.github_allow_merge_commit
allow_squash_merge = var.github_allow_squash_merge
allow_rebase_merge = var.github_allow_rebase_merge
archive_on_destroy = true
archive_on_destroy = var.archive_on_destroy
delete_branch_on_merge = var.github_delete_branch_on_merge
has_projects = var.github_has_projects
has_issues = var.github_has_issues
Expand Down
10 changes: 8 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ information. For workflows that use reusable workflows,
the pattern is <initial_workflow.jobs.job.[name/id]> / <reused-workflow.jobs.job.[name/id]>.
This can extend multiple levels.
EOT
type = object({
type = object({
contexts = list(string)
strict = optional(bool, false)
})
default = null
default = null
}

variable "archived" {
Expand Down Expand Up @@ -192,3 +192,9 @@ variable "collaborators" {
description = "list of repo callaborators"
default = {}
}


variable "archive_on_destroy" {
type = bool
default = true
}

0 comments on commit 73edcf4

Please sign in to comment.