Skip to content

Commit 6f460e6

Browse files
Merge pull request #65 from mineiros-io/soerenmartius/aws-provider-4
Add support for newly released AWS provider v4.x
2 parents 8d1e3ca + 29cbfcd commit 6f460e6

File tree

12 files changed

+112
-732
lines changed

12 files changed

+112
-732
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
repos:
22
- repo: https://github.com/mineiros-io/pre-commit-hooks
3-
rev: v0.3.0
3+
rev: v0.3.1
44
hooks:
55
- id: terraform-fmt
66
- id: terraform-validate
77
exclude: ^examples|.terraform/
88
- id: tflint
99
- id: golangci-lint
1010
- id: phony-targets
11+
- id: markdown-link-check
12+
args: ['-p'] # When adding the -p flag, markdown-link-check will always with an exit code 0, even if dead links are found
13+
verbose: true # Forces the output of the hook to be printed even when the hook passes.

CHANGELOG.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.9.2]
11+
12+
### Added
13+
14+
- Added support for AWS provider `v4.x`
15+
1016
## [0.9.1]
1117

1218
### Added
@@ -152,13 +158,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
152158
- Document the usage of examples.
153159
- Add unit tests for basic use cases.
154160

155-
<!-- markdown-link-check-disable -->
156-
157-
[unreleased]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.9.1...HEAD
161+
[unreleased]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.9.2...HEAD
162+
[0.9.2]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.9.1...v0.9.2
158163
[0.9.1]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.9.0...v0.9.1
159-
160-
<!-- markdown-link-check-enable -->
161-
162164
[0.9.0]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.8.0...v0.9.0
163165
[0.8.0]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.7.0...v0.8.0
164166
[0.7.0]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.6.0...v0.7.0

CONTRIBUTING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,8 @@ If everything looks good, they will merge the code and release a new version whi
7777

7878
<!-- References -->
7979

80-
<!-- markdown-link-check-disable -->
8180
[Pull Requests]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/pulls
8281
[pre-commit-file]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/blob/master/.pre-commit-config.yaml
83-
<!-- markdown-link-check-enable -->
84-
8582
[Github Flow]: https://guides.github.com/introduction/flow/
8683
[CODEOWNERS]: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
8784
[Fork]: https://help.github.com/en/github/getting-started-with-github/fork-a-repo

Makefile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Set default shell to bash
22
SHELL := /bin/bash -o pipefail
33

4-
BUILD_TOOLS_VERSION ?= v0.13.0
4+
BUILD_TOOLS_VERSION ?= v0.14.3
55
BUILD_TOOLS_DOCKER_REPO ?= mineiros/build-tools
66
BUILD_TOOLS_DOCKER_IMAGE ?= ${BUILD_TOOLS_DOCKER_REPO}:${BUILD_TOOLS_VERSION}
77

@@ -59,6 +59,13 @@ ifdef AWS_ACCESS_KEY_ID
5959
DOCKER_AWS_FLAGS += -e AWS_SESSION_TOKEN
6060
endif
6161

62+
# If GOOGLE_CREDENTIALS is defined, we are likely running inside a GCP provider
63+
# module. To enable GCP authentication inside the docker container, we inject
64+
# the relevant environment variables (service-account key file).
65+
ifdef GOOGLE_CREDENTIALS
66+
DOCKER_GCP_FLAGS += -e GOOGLE_CREDENTIALS
67+
endif
68+
6269
# If GITHUB_OWNER is defined, we are likely running inside a GitHub provider
6370
# module. To enable GitHub authentication inside the docker container,
6471
# we inject the relevant environment variables.
@@ -87,12 +94,19 @@ test/pre-commit:
8794
test/unit-tests: DOCKER_FLAGS += ${DOCKER_SSH_FLAGS}
8895
test/unit-tests: DOCKER_FLAGS += ${DOCKER_GITHUB_FLAGS}
8996
test/unit-tests: DOCKER_FLAGS += ${DOCKER_AWS_FLAGS}
97+
test/unit-tests: DOCKER_FLAGS += ${DOCKER_GCP_FLAGS}
98+
test/unit-tests: DOCKER_FLAGS += $(shell env | grep ^TF_VAR_ | cut -d = -f 1 | xargs -i printf ' -e {}')
9099
test/unit-tests: DOCKER_FLAGS += -e TF_DATA_DIR=.terratest
91100
test/unit-tests: TEST ?= "TestUnit"
92101
test/unit-tests:
93102
@echo "${YELLOW}[TEST] ${GREEN}Start Running Go Tests in Docker Container.${RESET}"
94103
$(call go-test,./test -run $(TEST))
95104

105+
## Generate README.md with Terradoc
106+
.PHONY: terradoc
107+
terradoc:
108+
$(call quiet-command,terradoc -o README.md README.tfdoc.hcl)
109+
96110
## Clean up cache and temporary files
97111
.PHONY: clean
98112
clean:
@@ -116,11 +130,6 @@ help:
116130
} \
117131
{ lastLine = $$0 }' $(MAKEFILE_LIST)
118132

119-
## Generate README.md with Terradoc
120-
.PHONY: terradoc
121-
terradoc:
122-
$(call quiet-command,terradoc -o README.md README.tfdoc.hcl)
123-
124133
# Define helper functions
125134
DOCKER_FLAGS += ${DOCKER_RUN_FLAGS}
126135
DOCKER_RUN_CMD = docker run ${DOCKER_FLAGS} ${BUILD_TOOLS_DOCKER_IMAGE}

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build Status](https://github.com/mineiros-io/terraform-aws-cognito-user-pool/workflows/CI/CD%20Pipeline/badge.svg)](https://github.com/mineiros-io/terraform-aws-cognito-user-pool/actions)
44
[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/mineiros-io/terraform-aws-cognito-user-pool.svg?label=latest&sort=semver)](https://github.com/mineiros-io/terraform-aws-cognito-user-pool/releases)
55
[![Terraform Version](https://img.shields.io/badge/terraform-1.x%20|%200.15%20|%200.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform)](https://github.com/hashicorp/terraform/releases)
6-
[![AWS Provider Version](https://img.shields.io/badge/AWS-3.19+-F8991D.svg?logo=terraform)](https://github.com/terraform-providers/terraform-provider-aws/releases)
6+
[![AWS Provider Version](https://img.shields.io/badge/AWS-3.50+-F8991D.svg?logo=terraform)](https://github.com/terraform-providers/terraform-provider-aws/releases)
77
[![Join Slack](https://img.shields.io/badge/[email protected]?logo=slack)](https://mineiros.io/slack)
88

99
# terraform-aws-cognito-user-pool
@@ -13,9 +13,7 @@ A [Terraform] module for deploying and managing
1313
on [Amazon Web Services (AWS)][AWS].
1414

1515
*This module supports Terraform v1.x, v0.15, v0.14, v0.13 as well as v0.12.20 and above
16-
and is compatible with the Terraform AWS provider v3.19 and above.*
17-
18-
The last version supporting Terraform AWS provider v2.x is v0.4.1.
16+
and is compatible with the Terraform AWS provider v3.50 and above.
1917

2018

2119
- [Module Features](#module-features)

README.tfdoc.hcl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ header {
2121
}
2222

2323
badge "tf-aws-provider" {
24-
image = "https://img.shields.io/badge/AWS-3.19+-F8991D.svg?logo=terraform"
24+
image = "https://img.shields.io/badge/AWS-3.50+-F8991D.svg?logo=terraform"
2525
url = "https://github.com/terraform-providers/terraform-provider-aws/releases"
2626
text = "AWS Provider Version"
2727
}
@@ -42,9 +42,7 @@ section {
4242
on [Amazon Web Services (AWS)][AWS].
4343
4444
*This module supports Terraform v1.x, v0.15, v0.14, v0.13 as well as v0.12.20 and above
45-
and is compatible with the Terraform AWS provider v3.19 and above.*
46-
47-
The last version supporting Terraform AWS provider v2.x is v0.4.1.
45+
and is compatible with the Terraform AWS provider v3.50 and above.
4846
END
4947

5048
section {

go.mod

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,56 @@ module github.com/mineiros-io/terraform-aws-cognito-user-pool
33
go 1.17
44

55
require (
6-
github.com/gruntwork-io/terratest v0.38.2
6+
github.com/gruntwork-io/terratest v0.40.0
77
github.com/stretchr/testify v1.7.0
88
)
99

1010
require (
11+
cloud.google.com/go v0.83.0 // indirect
12+
cloud.google.com/go/storage v1.10.0 // indirect
1113
github.com/agext/levenshtein v1.2.3 // indirect
1214
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
15+
github.com/aws/aws-sdk-go v1.40.56 // indirect
16+
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
1317
github.com/davecgh/go-spew v1.1.1 // indirect
18+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
19+
github.com/golang/protobuf v1.5.2 // indirect
20+
github.com/golang/snappy v0.0.3 // indirect
21+
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
1422
github.com/hashicorp/errwrap v1.0.0 // indirect
23+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
24+
github.com/hashicorp/go-getter v1.5.9 // indirect
1525
github.com/hashicorp/go-multierror v1.1.0 // indirect
26+
github.com/hashicorp/go-safetemp v1.0.0 // indirect
27+
github.com/hashicorp/go-version v1.3.0 // indirect
1628
github.com/hashicorp/hcl/v2 v2.9.1 // indirect
17-
github.com/hashicorp/terraform-json v0.12.0 // indirect
29+
github.com/hashicorp/terraform-json v0.13.0 // indirect
1830
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a // indirect
31+
github.com/jmespath/go-jmespath v0.4.0 // indirect
32+
github.com/jstemmer/go-junit-report v0.9.1 // indirect
33+
github.com/klauspost/compress v1.13.0 // indirect
1934
github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect
35+
github.com/mitchellh/go-homedir v1.1.0 // indirect
36+
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
2037
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
2138
github.com/pmezard/go-difflib v1.0.0 // indirect
2239
github.com/tmccombs/hcl2json v0.3.3 // indirect
23-
github.com/zclconf/go-cty v1.8.1 // indirect
40+
github.com/ulikunitz/xz v0.5.8 // indirect
41+
github.com/zclconf/go-cty v1.9.1 // indirect
42+
go.opencensus.io v0.23.0 // indirect
2443
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
44+
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
45+
golang.org/x/mod v0.4.2 // indirect
2546
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
47+
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
2648
golang.org/x/sys v0.0.0-20210603125802-9665404d3644 // indirect
2749
golang.org/x/text v0.3.6 // indirect
50+
golang.org/x/tools v0.1.2 // indirect
51+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
52+
google.golang.org/api v0.47.0 // indirect
53+
google.golang.org/appengine v1.6.7 // indirect
54+
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
55+
google.golang.org/grpc v1.38.0 // indirect
56+
google.golang.org/protobuf v1.26.0 // indirect
2857
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
2958
)

0 commit comments

Comments
 (0)