Skip to content

Commit 4be773a

Browse files
ostermanjamengual
andauthored
Support terraform 0.13 (#20)
Co-authored-by: PePe Amengual <[email protected]>
1 parent 5686e2c commit 4be773a

File tree

13 files changed

+137
-143
lines changed

13 files changed

+137
-143
lines changed

.github/auto-release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: '$RESOLVED_VERSION'
3+
version-template: '$MAJOR.$MINOR.$PATCH'
4+
version-resolver:
5+
major:
6+
labels:
7+
- 'major'
8+
minor:
9+
labels:
10+
- 'minor'
11+
- 'enhancement'
12+
patch:
13+
labels:
14+
- 'patch'
15+
- 'fix'
16+
- 'bugfix'
17+
- 'bug'
18+
- 'hotfix'
19+
default: 'minor'
20+
21+
categories:
22+
- title: '🚀 Enhancements'
23+
labels:
24+
- 'enhancement'
25+
- title: '🐛 Bug Fixes'
26+
labels:
27+
- 'fix'
28+
- 'bugfix'
29+
- 'bug'
30+
- 'hotfix'
31+
32+
change-template: |
33+
<details>
34+
<summary>$TITLE @$AUTHOR (#$NUMBER)</summary>
35+
36+
$BODY
37+
</details>
38+
39+
template: |
40+
$CHANGES

.github/workflows/auto-release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: auto-release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
semver:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# Drafts your next Release notes as Pull Requests are merged into "master"
13+
- uses: release-drafter/release-drafter@v5
14+
with:
15+
publish: true
16+
prerelease: false
17+
config-name: auto-release.yml
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/chatops.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111
- name: "Handle common commands"
12-
uses: cloudposse/actions/github/slash-command-dispatch@0.15.0
12+
uses: cloudposse/actions/github/slash-command-dispatch@0.16.0
1313
with:
1414
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
1515
reaction-token: ${{ secrets.GITHUB_TOKEN }}
1616
repository: cloudposse/actions
1717
commands: rebuild-readme, terraform-fmt
18-
permission: none
18+
permission: triage
1919
issue-type: pull-request
2020

2121
test:
@@ -24,13 +24,13 @@ jobs:
2424
- name: "Checkout commit"
2525
uses: actions/checkout@v2
2626
- name: "Run tests"
27-
uses: cloudposse/actions/github/slash-command-dispatch@0.15.0
27+
uses: cloudposse/actions/github/slash-command-dispatch@0.16.0
2828
with:
2929
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
3030
reaction-token: ${{ secrets.GITHUB_TOKEN }}
3131
repository: cloudposse/actions
3232
commands: test
33-
permission: none
33+
permission: triage
3434
issue-type: pull-request
3535
reactions: false
3636

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Available targets:
156156

157157
| Name | Version |
158158
|------|---------|
159-
| terraform | >= 0.12.0, < 0.14.0 |
159+
| terraform | >= 0.12.0 |
160160
| aws | ~> 2.0 |
161161
| external | ~> 1.2 |
162162
| local | ~> 1.3 |

docs/terraform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Name | Version |
44
|------|---------|
5-
| terraform | >= 0.12.0, < 0.14.0 |
5+
| terraform | >= 0.12.0 |
66
| aws | ~> 2.0 |
77
| external | ~> 1.2 |
88
| local | ~> 1.3 |

lambda.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ resource "aws_iam_role_policy_attachment" "lambda" {
6666
}
6767

6868
module "artifact" {
69-
source = "git::https://github.com/cloudposse/terraform-external-module-artifact.git?ref=tags/0.2.0"
69+
source = "git::https://github.com/cloudposse/terraform-external-module-artifact.git?ref=tags/0.4.0"
7070
filename = var.artifact_filename
7171
module_name = "terraform-aws-ses-lambda-forwarder"
7272
module_path = path.module

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ data "aws_caller_identity" "current" {
22
}
33

44
module "label" {
5-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0"
5+
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.17.0"
66
namespace = var.namespace
77
stage = var.stage
88
name = var.name

test/src/Gopkg.lock

Lines changed: 0 additions & 92 deletions
This file was deleted.

test/src/Gopkg.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/src/Makefile

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,30 @@
1-
PACKAGE = terraform-aws-ses-lambda-forwarder
2-
GOEXE ?= /usr/bin/go
3-
GOPATH = $(CURDIR)/.gopath
4-
GOBIN = $(GOPATH)/bin
5-
BASE = $(GOPATH)/src/$(PACKAGE)
6-
PATH := $(PATH):$(GOBIN)
7-
8-
export TF_DATA_DIR ?= $(CURDIR)/.terraform
91
export TF_CLI_ARGS_init ?= -get-plugins=true
10-
export GOPATH
2+
export TERRAFORM_VERSION ?= $(shell curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version' | cut -d. -f1-2)
3+
4+
.DEFAULT_GOAL : all
115

126
.PHONY: all
137
## Default target
148
all: test
159

16-
ifneq (,$(wildcard /sbin/apk))
17-
## Install go, if not installed
18-
$(GOEXE):
19-
apk add --update go
20-
endif
21-
22-
ifeq ($(shell uname -s),Linux)
23-
## Install all `dep`, if not installed
24-
$(GOBIN)/dep:
25-
@mkdir -p $(GOBIN)
26-
@curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
27-
endif
28-
29-
## Prepare the GOPATH
30-
$(BASE): $(GOEXE)
31-
@mkdir -p $(dir $@)
32-
@ln -sf $(CURDIR) $@
33-
34-
## Download vendor dependencies to vendor/
35-
$(BASE)/vendor: $(BASE) $(GOBIN)/dep
36-
cd $(BASE) && dep ensure
37-
3810
.PHONY : init
3911
## Initialize tests
40-
init: $(BASE)/vendor
12+
init:
13+
@exit 0
4114

4215
.PHONY : test
4316
## Run tests
4417
test: init
45-
cd $(BASE) && go test -v -timeout 30m -run TestExamplesComplete
18+
go mod download
19+
go test -v -timeout 60m -run TestExamplesComplete
20+
21+
## Run tests in docker container
22+
docker/test:
23+
docker run --name terratest --rm -it -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e GITHUB_TOKEN \
24+
-e PATH="/usr/local/terraform/$(TERRAFORM_VERSION)/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
25+
-v $(CURDIR)/../../:/module/ cloudposse/test-harness:latest -C /module/test/src test
4626

4727
.PHONY : clean
4828
## Clean up files
4929
clean:
50-
rm -rf .gopath/ vendor/ $(TF_DATA_DIR)
30+
rm -rf ../../examples/complete/*.tfstate*

0 commit comments

Comments
 (0)