Skip to content

Commit

Permalink
chore(examples): Upgrade default example to terraform 1.x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm committed Aug 5, 2021
1 parent ef1591c commit 8e7c21c
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ secrets.auto.tfvars
*.zip
*.gz
*.tgz
*.env
*.env*
.vscode

**/coverage/*
1 change: 1 addition & 0 deletions examples/default/.terraform-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.2
56 changes: 56 additions & 0 deletions examples/default/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion examples/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ terraform apply
cd ..
```

Before running Terraform, ensure the GitHub app is configured.
Before running Terraform, ensure the GitHub app is configured. See the [configuration details](../../README.md#usages) for more details.

```bash
terraform init
terraform apply
```

You can receive the webhook details by running:

```bash
terraform output -raw webhook_secret
```

Be-aware some shells will print some end of line character `%`.
13 changes: 8 additions & 5 deletions examples/default/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ output "runners" {
}
}

output "webhook" {
value = {
secret = random_password.random.result
endpoint = module.runners.webhook.endpoint
}
output "webhook_endpoint" {
value = module.runners.webhook.endpoint
}

output "webhook_secret" {
sensitive = true
value = random_password.random.result
}

3 changes: 1 addition & 2 deletions examples/default/providers.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
provider "aws" {
region = local.aws_region
version = "3.20"
region = local.aws_region
}
15 changes: 15 additions & 0 deletions examples/default/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.20"
}
local = {
source = "hashicorp/local"
}
random = {
source = "hashicorp/random"
}
}
required_version = ">= 0.14"
}

0 comments on commit 8e7c21c

Please sign in to comment.