Skip to content

Instantly share code, notes, and snippets.

View soerenmartius's full-sized avatar
🎯
focused

Sören Martius soerenmartius

🎯
focused
View GitHub Profile
@soerenmartius
soerenmartius / asciidoc-syntax-quick-reference.adoc
Created January 5, 2020 19:02 — forked from mojavelinux/asciidoc-syntax-quick-reference.adoc
AsciiDoc Syntax Quick Reference (sample document)

AsciiDoc Syntax Quick Reference

@soerenmartius
soerenmartius / GitHub Flavored Asciidoc (GFA).adoc
Created January 5, 2020 19:03 — forked from dcode/GitHub Flavored Asciidoc (GFA).adoc
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@soerenmartius
soerenmartius / main.tf
Last active March 8, 2020 12:10
How to manage your GitHub Organization with Terraform - without modules
provider github {
organization = var.organization
}
# Make the organization configurable through variables
variable "organization" {
description = "The name of the organization to deploy the resources in."
type = string
}
@soerenmartius
soerenmartius / organization.tf
Created March 5, 2020 17:33
How to manage your GitHub Organization with Terraform - organization
locals {
# A map of admin machine users. These users are used for tasks such like CI & CD, releasing, etc.
admin_machine_users = {
}
# A map of GitHub users that should have admin permissions
admin_users = {
"alice@acme.com" = "alice"
"bob@acme.com" = "bob"
@soerenmartius
soerenmartius / provider.tf
Created March 5, 2020 17:34
How to manage your GitHub Organization with Terraform - Provider
provider "github" {
version = "~> 2.1"
organization = "the-name-of-your-organization"
}
@soerenmartius
soerenmartius / teams.tf
Created March 5, 2020 17:35
How to manage your GitHub Organization with Terraform - Teams
module "team_reviewers" {
source = "mineiros-io/team/github"
version = "0.1.2"
name = "Reviewers"
description = "A team of users that are mandatory for reviewing Pull Requests."
privacy = "secret"
members = [
local.member_users["stephe@acme.com"],
@soerenmartius
soerenmartius / repositories.tf
Created March 5, 2020 17:36
How to manage your GitHub Organization with Terraform - Repositories
locals {
# default settings for private repositories
private_defaults = {
private = true
has_issues = true
allow_merge_commit = true
topics = [
"iac",
"terraform",
@soerenmartius
soerenmartius / repositories.tf
Last active March 8, 2020 12:12
How to manage your GitHub Organization with Terraform - Repositories
module "public_repository" {
source = "mineiros-io/repository/github"
version = "~> 0.1.0"
name = "public-repository"
homepage_url = "https://medium.com/mineiros"
description = "A test repository create for demonstration purpose for the How to manage your GitHub Organization with Terraform article."
defaults = local.public_defaults
branch_protections = local.default_branch_protections
@soerenmartius
soerenmartius / import.tf
Created March 5, 2020 17:40
How to manage your GitHub Organization with Terraform - Import Resources
module "repository" {
source = "mineiros-io/repository/github"
version = "0.1.0"
name = "i-love-teraform"
}
@soerenmartius
soerenmartius / aws.tf
Last active March 29, 2020 15:39
Create S3 Bucket, DynamoDB Table and new User for Terraform
# ---------------------------------------------------------------------------------------------------------------------
# Create the S3 Bucket and DynamoDB Table
# ---------------------------------------------------------------------------------------------------------------------
module "terraform_state_s3_bucket" {
source = "mineiros-io/s3-bucket/aws"
version = "~> 0.1.2"
bucket = "github-terraform-example-terraform-state"
versioning = {