Skip to content

Commit 38c1896

Browse files
authored
Update terraform GitHub repository webhooks (#23)
* Bump `terraform-github-repository-webhooks` version. Remove unsupported `name` variable * Rebuild README
1 parent 3900b4c commit 38c1896

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,17 @@ We literally have [*hundreds of terraform modules*][terraform_modules] that are
4343
## Usage
4444

4545

46+
**IMPORTANT:** The `master` branch is used in `source` just as an example. In your code, do not pin to `master` because there may be breaking changes between releases.
47+
Instead pin to the release tag (e.g. `?ref=tags/x.y.z`) of one of our [latest releases](https://github.com/cloudposse/terraform-aws-ecs-codepipeline/releases).
48+
49+
50+
4651
### Trigger on GitHub Push
4752

4853
In this example, we'll trigger the pipeline anytime the `master` branch is updated.
4954
```hcl
5055
module "ecs_push_pipeline" {
51-
source = "git::https://github.com/cloudposse/terraform-aws-ecs-codepipeline.git?ref=tags/0.1.2"
56+
source = "git::https://github.com/cloudposse/terraform-aws-ecs-codepipeline.git?ref=master"
5257
name = "app"
5358
namespace = "eg"
5459
stage = "staging"
@@ -68,7 +73,7 @@ In this example, we'll trigger anytime a new GitHub release is cut by setting th
6873

6974
```hcl
7075
module "ecs_release_pipeline" {
71-
source = "git::https://github.com/cloudposse/terraform-aws-ecs-codepipeline.git?ref=tags/0.1.2"
76+
source = "git::https://github.com/cloudposse/terraform-aws-ecs-codepipeline.git?ref=master"
7277
name = "app"
7378
namespace = "eg"
7479
stage = "staging"
@@ -180,7 +185,7 @@ Available targets:
180185
|------|-------------|
181186
| badge_url | The URL of the build badge when badge_enabled is enabled |
182187
| webhook_id | The CodePipeline webhook's ARN. |
183-
| webhook_url | The CodePipeline webhook's URL. POST events to this endpoint to trigger the target. |
188+
| webhook_url | The CodePipeline webhook's URL. POST events to this endpoint to trigger the target |
184189

185190

186191

README.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ usage: |-
6363
In this example, we'll trigger the pipeline anytime the `master` branch is updated.
6464
```hcl
6565
module "ecs_push_pipeline" {
66-
source = "git::https://github.com/cloudposse/terraform-aws-ecs-codepipeline.git?ref=tags/0.1.2"
66+
source = "git::https://github.com/cloudposse/terraform-aws-ecs-codepipeline.git?ref=master"
6767
name = "app"
6868
namespace = "eg"
6969
stage = "staging"
@@ -83,7 +83,7 @@ usage: |-
8383
8484
```hcl
8585
module "ecs_release_pipeline" {
86-
source = "git::https://github.com/cloudposse/terraform-aws-ecs-codepipeline.git?ref=tags/0.1.2"
86+
source = "git::https://github.com/cloudposse/terraform-aws-ecs-codepipeline.git?ref=master"
8787
name = "app"
8888
namespace = "eg"
8989
stage = "staging"
@@ -106,7 +106,7 @@ usage: |-
106106
# Example usage
107107
examples: |-
108108
Complete usage can be seen in the [terraform-aws-ecs-web-app](https://github.com/cloudposse/terraform-aws-ecs-web-app/blob/master/main.tf) module.
109-
109+
110110
## Example Buildspec
111111
112112
Here's an example `buildspec.yaml`. Stick this in the root of your project repository.

docs/terraform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@
4040
|------|-------------|
4141
| badge_url | The URL of the build badge when badge_enabled is enabled |
4242
| webhook_id | The CodePipeline webhook's ARN. |
43-
| webhook_url | The CodePipeline webhook's URL. POST events to this endpoint to trigger the target. |
43+
| webhook_url | The CodePipeline webhook's URL. POST events to this endpoint to trigger the target |
4444

main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,13 @@ resource "aws_codepipeline_webhook" "webhook" {
306306
}
307307

308308
module "github_webhooks" {
309-
source = "git::https://github.com/cloudposse/terraform-github-repository-webhooks.git?ref=tags/0.1.1"
309+
source = "git::https://github.com/cloudposse/terraform-github-repository-webhooks.git?ref=tags/0.3.0"
310310
enabled = "${local.enabled && var.webhook_enabled == "true" ? "true" : "false"}"
311311
github_organization = "${var.repo_owner}"
312312
github_repositories = ["${var.repo_name}"]
313313
github_token = "${var.github_oauth_token}"
314314
webhook_url = "${local.webhook_url}"
315315
webhook_secret = "${local.webhook_secret}"
316316
webhook_content_type = "json"
317-
name = "web"
318317
events = ["${var.github_webhook_events}"]
319318
}

outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ output "webhook_id" {
99
}
1010

1111
output "webhook_url" {
12-
description = "The CodePipeline webhook's URL. POST events to this endpoint to trigger the target."
12+
description = "The CodePipeline webhook's URL. POST events to this endpoint to trigger the target"
1313
value = "${local.webhook_url}"
1414
sensitive = true
1515
}

0 commit comments

Comments
 (0)