Skip to content

Commit

Permalink
Merge pull request #27 from mineiros-io/mariux/tf14
Browse files Browse the repository at this point in the history
feat: Add support for Terraform v0.14.x
  • Loading branch information
mariux authored Dec 10, 2020
2 parents a5d1d77 + 7264d26 commit 6a5a53a
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 20 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0] - 2020-12-09
### Changed
- Add support for Terraform v0.14

## [0.3.0] - 2020-11-25
### Changes
- Add argument `user_device_tracking` to set device tracking to `OFF`, `ALWAYS` or `USER_OPT_IN`
Expand All @@ -22,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.2.0] - 2020-08-13
### Changed
- Add support for Terraform v0.13
- Prepared support for Terraform 0.14
- Prepared support for Terraform v0.14

## [0.1.4] - 2020-08-13
### Added
Expand Down Expand Up @@ -65,9 +69,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add unit tests for basic use cases.

<!-- markdown-link-check-disable -->
[Unreleased]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.2.0...v0.3.0
[Unreleased]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.3.0...v0.4.0
<!-- markdown-link-check-enable -->
[0.3.0]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.1.4...v0.2.0
[0.1.4]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/compare/v0.1.2...v0.1.3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Set default shell to bash
SHELL := /bin/bash -o pipefail

BUILD_TOOLS_VERSION ?= v0.6.1
BUILD_TOOLS_VERSION ?= v0.7.0
BUILD_TOOLS_DOCKER_REPO ?= mineiros/build-tools
BUILD_TOOLS_DOCKER_IMAGE ?= ${BUILD_TOOLS_DOCKER_REPO}:${BUILD_TOOLS_VERSION}

Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
[![AWS Provider Version][badge-tf-aws]][releases-aws-provider]
[![Join Slack][badge-slack]][slack]

# terraform-aws-cognito-user-pool
# mineiros-io/cognito-user-pool/aws

A [Terraform] module for deploying and managing
[Cognito User Pools]
on [Amazon Web Services (AWS)][AWS].

***This module supports Terraform v0.13 as well as v0.12.20 and above
and is compatible with the terraform AWS provider v3 as well as v2.54 and above.***
*This module supports Terraform v0.14, v0.13 as well as v0.12.20 and above
and is compatible with the terraform AWS provider v3 as well as v2.54 and above.*

**We, [Mineiros][mineiros-library], offer [professional support][mineiros-pricing] for this module.**

- [Module Features](#module-features)
- [Getting Started](#getting-started)
Expand Down Expand Up @@ -63,7 +65,7 @@ Most basic usage just setting required arguments:
```hcl
module "terraform-aws-cognito-user-pool" {
source = "mineiros-io/cognito-user-pool/aws"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "application-userpool"
}
Expand Down Expand Up @@ -558,12 +560,15 @@ Copyright &copy; 2020 [Mineiros GmbH][homepage]

[homepage]: https://mineiros.io/?ref=terraform-aws-cognito-user-pool

[mineiros-library]: https://www.mineiros.io/solutions/terraform-library
[mineiros-pricing]: https://www.mineiros.io/solutions/terraform-library#pricing

[[email protected]]: mailto:[email protected]
[badge-build]: https://github.com/mineiros-io/terraform-aws-lambda-function/workflows/CI/CD%20Pipeline/badge.svg

[badge-semver]: https://img.shields.io/github/v/tag/mineiros-io/terraform-aws-cognito-user-pool.svg?label=latest&sort=semver
[badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg
[badge-terraform]: https://img.shields.io/badge/terraform-0.13%20and%200.12.20+-623CE4.svg?logo=terraform
[badge-terraform]: https://img.shields.io/badge/terraform-0.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform
[badge-slack]: https://img.shields.io/badge/[email protected]?logo=slack

[build-status]: https://github.com/mineiros-io/terraform-aws-cognito-user-pool/actions
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ shows how to deploy a Cognito User Pool with custom settings.
```hcl
module "cognito_user_pool" {
source = "mineiros-io/cognito-user-pool/aws"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "complete-example-userpool"
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ provider "aws" {

module "cognito_user_pool" {
source = "mineiros-io/cognito-user-pool/aws"
version = "~> 0.3.0"
version = "~> 0.4.0"

name = "complete-example-userpool"

Expand Down
2 changes: 1 addition & 1 deletion examples/user-pool-with-default-settings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defined in the [variables.tf] file of this module.
```hcl
module "cognito_user_pool" {
source = "mineiros-io/cognito-user-pool/aws"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "example-userpool"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/user-pool-with-default-settings/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ provider "aws" {

module "cognito_user_pool" {
source = "mineiros-io/cognito-user-pool/aws"
version = "~> 0.3.0"
version = "~> 0.4.0"

name = "example-userpool"
}
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "aws_cognito_user_pool" "user_pool" {
}
}

dynamic software_token_mfa_configuration {
dynamic "software_token_mfa_configuration" {
for_each = var.allow_software_mfa_token ? [true] : []

content {
Expand Down Expand Up @@ -76,7 +76,7 @@ resource "aws_cognito_user_pool" "user_pool" {
}
}

dynamic schema {
dynamic "schema" {
for_each = var.schema_attributes
iterator = attribute

Expand All @@ -87,7 +87,7 @@ resource "aws_cognito_user_pool" "user_pool" {
developer_only_attribute = try(attribute.value.developer_only_attribute, false)
mutable = try(attribute.value.mutable, true)

dynamic number_attribute_constraints {
dynamic "number_attribute_constraints" {
for_each = attribute.value.type == "Number" ? [true] : []

content {
Expand All @@ -96,7 +96,7 @@ resource "aws_cognito_user_pool" "user_pool" {
}
}

dynamic string_attribute_constraints {
dynamic "string_attribute_constraints" {
for_each = attribute.value.type == "String" ? [true] : []

content {
Expand All @@ -108,7 +108,7 @@ resource "aws_cognito_user_pool" "user_pool" {
}
}

dynamic lambda_config {
dynamic "lambda_config" {
for_each = try(coalesce(
var.lambda_create_auth_challenge,
var.lambda_custom_message,
Expand Down Expand Up @@ -141,7 +141,7 @@ resource "aws_cognito_user_pool" "user_pool" {
# Due to Cognito API restrictions, the SMS configuration cannot be removed without recreating the Cognito User Pool.
# For user data safety, this resource will ignore the removal of this configuration by disabling drift detection.
# To force resource recreation after this configuration has been applied, see the taint command.
dynamic sms_configuration {
dynamic "sms_configuration" {
for_each = var.sms_configuration != null ? [var.sms_configuration] : []

content {
Expand Down
1 change: 1 addition & 0 deletions test/user-pool/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
output "user_pool" {
description = "All outputs exposed by the module."
value = merge(module.cognito_user_pool, { client_secrets = null })
sensitive = true
}

output "client_secrets" {
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 0.12.20, < 0.14"
required_version = ">= 0.12.20, < 0.15"

required_providers {
aws = ">= 2.54, < 4.0"
Expand Down

0 comments on commit 6a5a53a

Please sign in to comment.