Skip to content

Additional TF 0.13 Fixes #24

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# Use this file to define individuals or teams that are responsible for code in a repository.
# Read more: <https://help.github.com/articles/about-codeowners/>
#
# Order is important: the last matching pattern takes the most precedence

* @cloudposse/engineering
# These owners will be the default owners for everything
* @cloudposse/engineering @cloudposse/contributors

# Cloud Posse must review any changes to Makefiles
**/Makefile @cloudposse/engineering
**/Makefile.* @cloudposse/engineering

# Cloud Posse must review any changes to GitHub actions
.github/* @cloudposse/engineering
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) in the `#geodesic` channel or visit our [Slack Archive](https://archive.sweetops.com/geodesic/).
Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) or visit our [Slack Archive](https://archive.sweetops.com/).

[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)

Expand All @@ -33,4 +33,4 @@ Explain what alternative solutions or features you've considered.

## Additional Context

Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here.
40 changes: 40 additions & 0 deletions .github/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
version-template: '$MAJOR.$MINOR.$PATCH'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
- 'enhancement'
patch:
labels:
- 'patch'
- 'fix'
- 'bugfix'
- 'bug'
- 'hotfix'
default: 'minor'

categories:
- title: '🚀 Enhancements'
labels:
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'hotfix'

change-template: |
<details>
<summary>$TITLE @$AUTHOR (#$NUMBER)</summary>

$BODY
</details>

template: |
$CHANGES
19 changes: 19 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: auto-release

on:
push:
branches:
- master

jobs:
semver:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
with:
publish: true
prerelease: false
config-name: auto-release.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/chatops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: "Handle common commands"
uses: cloudposse/actions/github/slash-command-dispatch@0.15.0
uses: cloudposse/actions/github/slash-command-dispatch@0.16.0
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
repository: cloudposse/actions
commands: rebuild-readme, terraform-fmt
permission: none
permission: triage
issue-type: pull-request

test:
Expand All @@ -24,13 +24,13 @@ jobs:
- name: "Checkout commit"
uses: actions/checkout@v2
- name: "Run tests"
uses: cloudposse/actions/github/slash-command-dispatch@0.15.0
uses: cloudposse/actions/github/slash-command-dispatch@0.16.0
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
repository: cloudposse/actions
commands: test
permission: none
permission: triage
issue-type: pull-request
reactions: false

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ is given

| Name | Version |
|------|---------|
| terraform | >= 0.12.0, < 0.14.0 |
| terraform | >= 0.12.0 |
| aws | ~> 2.0 |
| null | ~> 2.0 |
| template | ~> 2.0 |
Expand Down
2 changes: 1 addition & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ is given

| Name | Version |
|------|---------|
| terraform | >= 0.12.0, < 0.14.0 |
| terraform | >= 0.12.0 |
| aws | ~> 2.0 |
| null | ~> 2.0 |
| template | ~> 2.0 |
Expand Down
6 changes: 3 additions & 3 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ provider "aws" {
}

module "vpc" {
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.10.0"
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.16.1"
namespace = var.namespace
stage = var.stage
name = var.name
cidr_block = "172.16.0.0/16"
}

module "subnets" {
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.19.0"
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.26.0"
availability_zones = var.availability_zones
namespace = var.namespace
stage = var.stage
Expand All @@ -24,7 +24,7 @@ module "subnets" {
}

module "elasticsearch" {
source = "git::https://github.com/cloudposse/terraform-aws-elasticsearch.git?ref=tags/0.12.0"
source = "git::https://github.com/cloudposse/terraform-aws-elasticsearch.git?ref=tags/0.20.2"
namespace = var.namespace
stage = var.stage
name = var.name
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ data "aws_iam_policy_document" "default" {
# Modules
#--------------------------------------------------------------
module "label" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.17.0"
enabled = var.enabled
namespace = var.namespace
name = var.name
Expand All @@ -86,7 +86,7 @@ module "label" {
}

module "artifact" {
source = "git::https://github.com/cloudposse/terraform-external-module-artifact.git?ref=tags/0.3.0"
source = "git::https://github.com/cloudposse/terraform-external-module-artifact.git?ref=tags/0.4.0"
enabled = var.enabled
filename = "lambda.zip"
module_name = "terraform-aws-lambda-elasticsearch-cleanup"
Expand Down
92 changes: 0 additions & 92 deletions test/src/Gopkg.lock

This file was deleted.

7 changes: 0 additions & 7 deletions test/src/Gopkg.toml

This file was deleted.

48 changes: 14 additions & 34 deletions test/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,50 +1,30 @@
PACKAGE = terraform-aws-lambda-elasticsearch-cleanup
GOEXE ?= /usr/bin/go
GOPATH = $(CURDIR)/.gopath
GOBIN = $(GOPATH)/bin
BASE = $(GOPATH)/src/$(PACKAGE)
PATH := $(PATH):$(GOBIN)

export TF_DATA_DIR ?= $(CURDIR)/.terraform
export TF_CLI_ARGS_init ?= -get-plugins=true
export GOPATH
export TERRAFORM_VERSION ?= $(shell curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version' | cut -d. -f1-2)

.DEFAULT_GOAL : all

.PHONY: all
## Default target
all: test

ifneq (,$(wildcard /sbin/apk))
## Install go, if not installed
$(GOEXE):
apk add --update go
endif

ifeq ($(shell uname -s),Linux)
## Install all `dep`, if not installed
$(GOBIN)/dep:
@mkdir -p $(GOBIN)
@curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
endif

## Prepare the GOPATH
$(BASE): $(GOEXE)
@mkdir -p $(dir $@)
@ln -sf $(CURDIR) $@

## Download vendor dependencies to vendor/
$(BASE)/vendor: $(BASE) $(GOBIN)/dep
cd $(BASE) && dep ensure

.PHONY : init
## Initialize tests
init: $(BASE)/vendor
init:
@exit 0

.PHONY : test
## Run tests
test: init
cd $(BASE) && go test -v -timeout 120m -run TestExamplesComplete
go mod download
go test -v -timeout 60m -run TestExamplesComplete

## Run tests in docker container
docker/test:
docker run --name terratest --rm -it -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e GITHUB_TOKEN \
-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" \
-v $(CURDIR)/../../:/module/ cloudposse/test-harness:latest -C /module/test/src test

.PHONY : clean
## Clean up files
clean:
rm -rf .gopath/ vendor/ $(TF_DATA_DIR)
rm -rf ../../examples/complete/*.tfstate*
14 changes: 14 additions & 0 deletions test/src/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module github.com/cloudposse/terraform-aws-lambda-elasticsearch-cleanup

go 1.13

require (
github.com/aws/aws-sdk-go v1.34.7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/gruntwork-io/terratest v0.16.0
github.com/pquerna/otp v1.2.0 // indirect
github.com/stretchr/testify v1.5.1
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f // indirect
golang.org/x/sys v0.0.0-20190527104216-9cd6430ef91e // indirect
)
Loading