Skip to content

Commit 8e7c21c

Browse files
committed
chore(examples): Upgrade default example to terraform 1.x.x
1 parent ef1591c commit 8e7c21c

File tree

7 files changed

+91
-9
lines changed

7 files changed

+91
-9
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ secrets.auto.tfvars
1616
*.zip
1717
*.gz
1818
*.tgz
19-
*.env
19+
*.env*
2020
.vscode
2121

2222
**/coverage/*

examples/default/.terraform-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.2

examples/default/.terraform.lock.hcl

+56
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/default/README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@ terraform apply
1515
cd ..
1616
```
1717

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

2020
```bash
2121
terraform init
2222
terraform apply
2323
```
24+
25+
You can receive the webhook details by running:
26+
27+
```bash
28+
terraform output -raw webhook_secret
29+
```
30+
31+
Be-aware some shells will print some end of line character `%`.

examples/default/outputs.tf

+8-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ output "runners" {
44
}
55
}
66

7-
output "webhook" {
8-
value = {
9-
secret = random_password.random.result
10-
endpoint = module.runners.webhook.endpoint
11-
}
7+
output "webhook_endpoint" {
8+
value = module.runners.webhook.endpoint
129
}
10+
11+
output "webhook_secret" {
12+
sensitive = true
13+
value = random_password.random.result
14+
}
15+

examples/default/providers.tf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
provider "aws" {
2-
region = local.aws_region
3-
version = "3.20"
2+
region = local.aws_region
43
}

examples/default/versions.tf

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
terraform {
2+
required_providers {
3+
aws = {
4+
source = "hashicorp/aws"
5+
version = ">= 3.20"
6+
}
7+
local = {
8+
source = "hashicorp/local"
9+
}
10+
random = {
11+
source = "hashicorp/random"
12+
}
13+
}
14+
required_version = ">= 0.14"
15+
}

0 commit comments

Comments
 (0)