Skip to content

Flaconi/terraform-github-organization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform GitHub Organization module

Terraform module to manage settings of GitHub organization

lint test Tag Terraform License

Providers

Name Version
github ~> 6.12

Requirements

Name Version
terraform ~> 1.3
github ~> 6.12

Required Inputs

The following input variables are required:

Description: Github organization name to manage.

Type: string

Optional Inputs

The following input variables are optional (have default values):

Description: Global organization settings

Type:

object({
    general = object({
      billing_email    = string
      display_name     = optional(string)
      company          = optional(string)
      blog             = optional(string)
      email            = optional(string)
      twitter_username = optional(string)
      location         = optional(string)
      description      = optional(string)
    })
    projects = optional(object({
      organization = optional(bool, true)
      repository   = optional(bool, true)
    }), {})
    repository = optional(object({
      default_permission          = optional(string, "read")
      web_commit_signoff_required = optional(bool, false)
    }), {})
    members = optional(object({
      create_repositories          = optional(bool, true)
      create_public_repositories   = optional(bool, true)
      create_private_repositories  = optional(bool, true)
      create_internal_repositories = optional(bool, true)
      create_pages                 = optional(bool, true)
      create_public_pages          = optional(bool, true)
      create_private_pages         = optional(bool, true)
      fork_private_repositories    = optional(bool, false)
    }), {})
    security_for_new_repositories = optional(object({
      advanced_security               = optional(bool, false)
      dependabot_alerts               = optional(bool, false)
      dependabot_security_updates     = optional(bool, false)
      dependency_graph                = optional(bool, false)
      secret_scanning                 = optional(bool, false)
      secret_scanning_push_protection = optional(bool, false)
    }), {})
  })

Default: null

Description: Global organization secrets

Type:

map(object({
    value           = optional(string)
    value_encrypted = optional(string)
    visibility      = string # "all", "private" or "selected"
    repositories    = optional(set(string), [])
  }))

Default: {}

Description: Global dependabot secrets

Type:

map(object({
    value           = optional(string)
    value_encrypted = optional(string)
    visibility      = string # "all", "private" or "selected"
    repositories    = optional(set(string), [])
  }))

Default: {}

Description: List of webhook configurations.

Type:

list(object({
    ident  = string # some unique string to identify this webhook
    active = optional(bool, true)
    events = list(string)
    configuration = object({
      url          = string
      content_type = optional(string, "json")
      secret       = optional(string)
      insecure_ssl = optional(bool, false)
    })
  }))

Default: []

Outputs

Name Description
bot_secrets A map of create dependabot secret names
secrets A map of create secret names
settings Organization settings
webhook_urls Webhook URLs

License

MIT License

Copyright (c) 2022-2025 Flaconi GmbH

About

Terraform module to manage GitHub organization settings

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors