Skip to content

Latest commit

 

History

History
 
 

github-repository-webhook

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

GitHub repository webhook for Atlantis

Configuration in this directory creates GitHub repository webhooks configured to Atlantis URL. This example uses value of webhook secret which got generated when Atlantis setup by referring to terraform.tfstate, so this example has to run after Atlantis.

GitHub's personal access token can be generated at https://github.com/settings/tokens

Usage

To run this code you need to copy terraform.tfvars.sample into terraform.tfvars and put your GitHub token and Github owner there or specify them using environment variables (TF_VAR_github_token and TF_VAR_github_owner). Once ready, execute:

$ terraform init
$ terraform plan
$ terraform apply

Note that this example may create resources which cost money. Run terraform destroy when you don't need these resources.

Requirements

Name Version
terraform >= 0.13.1
aws >= 3.45
github >= 4.8

Providers

Name Version
terraform n/a

Modules

Name Source Version
github_repository_webhook ../../modules/github-repository-webhook n/a

Resources

Name Type
terraform_remote_state.atlantis data source

Inputs

Name Description Type Default Required
github_owner Github owner string n/a yes
github_token Github token string n/a yes

Outputs

Name Description
github_webhook_secret Github webhook secret
github_webhook_urls Github webhook URL