Skip to content

Commit 8f1c785

Browse files
Additional TF 0.13 Fixes (#135)
* Support terraform 0.13 * Updated README.md Co-authored-by: actions-bot <58130806+actions-bot@users.noreply.github.com>
1 parent 427b9cc commit 8f1c785

File tree

13 files changed

+139
-144
lines changed

13 files changed

+139
-144
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
@@ -179,7 +179,7 @@ Available targets:
179179

180180
| Name | Version |
181181
|------|---------|
182-
| terraform | >= 0.12.0, < 0.14.0 |
182+
| terraform | >= 0.12.0 |
183183
| aws | ~> 2.0 |
184184
| null | ~> 2.0 |
185185

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
| null | ~> 2.0 |
88

examples/complete/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ provider "aws" {
33
}
44

55
module "vpc" {
6-
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.8.0"
6+
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.16.1"
77
namespace = var.namespace
88
stage = var.stage
99
name = var.name
@@ -14,7 +14,7 @@ module "vpc" {
1414
}
1515

1616
module "subnets" {
17-
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.16.0"
17+
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.26.0"
1818
availability_zones = var.availability_zones
1919
namespace = var.namespace
2020
stage = var.stage
@@ -30,7 +30,7 @@ module "subnets" {
3030
}
3131

3232
module "elastic_beanstalk_application" {
33-
source = "git::https://github.com/cloudposse/terraform-aws-elastic-beanstalk-application.git?ref=tags/0.3.0"
33+
source = "git::https://github.com/cloudposse/terraform-aws-elastic-beanstalk-application.git?ref=tags/0.7.1"
3434
namespace = var.namespace
3535
stage = var.stage
3636
name = var.name

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ resource "aws_s3_bucket" "elb_logs" {
931931
}
932932

933933
module "dns_hostname" {
934-
source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.3.0"
934+
source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.5.0"
935935
enabled = var.dns_zone_id != "" && var.tier == "WebServer" ? true : false
936936
name = var.dns_subdomain != "" ? var.dns_subdomain : var.name
937937
zone_id = var.dns_zone_id

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-elastic-beanstalk-environment
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)