This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| func worker(wg *sync.WaitGroup, id int) { | |
| defer wg.Done() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module "iac-github" { | |
| source = "mineiros-io/repository/github" | |
| version = "~> 0.1.0" | |
| name = "iac-github" | |
| private = true | |
| description = "An example on how to manage a GitHub organization with Terraform." | |
| allow_merge_commit = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: v1.0 | |
| name: "Deploy to GitHub" | |
| agent: | |
| machine: | |
| type: e1-standard-2 | |
| os_image: ubuntu1804 | |
| global_job_config: | |
| env_vars: | |
| - name: BUILD_TOOLS_VERSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: v1.0 | |
| name: "IaC-Github CI Pipeline" | |
| agent: | |
| machine: | |
| type: e1-standard-2 | |
| os_image: ubuntu1804 | |
| global_job_config: | |
| env_vars: | |
| - name: BUILD_TOOLS_VERSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module "iac-github" { | |
| source = "mineiros-io/repository/github" | |
| version = "~>0.1.0" | |
| name = "iac-github" | |
| private = true | |
| description = "An example on how to manage a GitHub organization with Terraform." | |
| allow_merge_commit = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SHELL := /bin/bash | |
| MOUNT_TARGET_DIRECTORY = /app/src | |
| BUILD_TOOLS_DOCKER_REPO = mineiros/build-tools | |
| # Set default value for environment variable if there aren't set already | |
| ifndef BUILD_TOOLS_VERSION | |
| BUILD_TOOLS_VERSION := latest | |
| endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # --------------------------------------------------------------------------------------------------------------------- | |
| # SET TERRAFORM AND PROVIDER REQUIREMENTS | |
| # --------------------------------------------------------------------------------------------------------------------- | |
| terraform { | |
| required_version = "~> 0.12.24" | |
| backend "s3" { | |
| bucket = "github-terraform-example-terraform-state" | |
| key = "organization/github-terraform-example/terraform.tfstate" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # --------------------------------------------------------------------------------------------------------------------- | |
| # SET TERRAFORM AND PROVIDER REQUIREMENTS | |
| # --------------------------------------------------------------------------------------------------------------------- | |
| terraform { | |
| required_version = "~> 0.12.24" | |
| required_providers { | |
| aws = "~> 2.4" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # --------------------------------------------------------------------------------------------------------------------- | |
| # 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 = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module "repository" { | |
| source = "mineiros-io/repository/github" | |
| version = "0.1.0" | |
| name = "i-love-teraform" | |
| } |