diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml
new file mode 100644
index 0000000..d887a66
--- /dev/null
+++ b/.github/workflows/lock.yml
@@ -0,0 +1,21 @@
+name: 'Lock Threads'
+
+on:
+ schedule:
+ - cron: '50 1 * * *'
+
+jobs:
+ lock:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: dessant/lock-threads@v3
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ issue-comment: >
+ I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
+ If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
+ issue-inactive-days: '30'
+ pr-comment: >
+ I'm going to lock this pull request because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
+ If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
+ pr-inactive-days: '30'
diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml
index 168011c..cb32a0f 100644
--- a/.github/workflows/pr-title.yml
+++ b/.github/workflows/pr-title.yml
@@ -14,7 +14,7 @@ jobs:
steps:
# Please look up the latest version from
# https://github.com/amannn/action-semantic-pull-request/releases
- - uses: amannn/action-semantic-pull-request@v3.4.6
+ - uses: amannn/action-semantic-pull-request@v5.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index b8f1b8a..06270c8 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -17,11 +17,11 @@ jobs:
directories: ${{ steps.dirs.outputs.directories }}
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Get root directories
id: dirs
- uses: clowdhaus/terraform-composite-actions/directories@v1.3.0
+ uses: clowdhaus/terraform-composite-actions/directories@v1.8.0
preCommitMinVersions:
name: Min TF pre-commit
@@ -32,18 +32,18 @@ jobs:
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }}
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Terraform min/max versions
id: minMax
- uses: clowdhaus/terraform-min-max@v1.0.3
+ uses: clowdhaus/terraform-min-max@v1.2.0
with:
directory: ${{ matrix.directory }}
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
# Run only validate pre-commit check on min version supported
if: ${{ matrix.directory != '.' }}
- uses: clowdhaus/terraform-composite-actions/pre-commit@v1.3.0
+ uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.0
with:
terraform-version: ${{ steps.minMax.outputs.minVersion }}
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*'
@@ -51,7 +51,7 @@ jobs:
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
# Run only validate pre-commit check on min version supported
if: ${{ matrix.directory == '.' }}
- uses: clowdhaus/terraform-composite-actions/pre-commit@v1.3.0
+ uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.0
with:
terraform-version: ${{ steps.minMax.outputs.minVersion }}
args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)'
@@ -62,17 +62,17 @@ jobs:
needs: collectInputs
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Terraform min/max versions
id: minMax
- uses: clowdhaus/terraform-min-max@v1.0.3
+ uses: clowdhaus/terraform-min-max@v1.2.0
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }}
- uses: clowdhaus/terraform-composite-actions/pre-commit@v1.3.0
+ uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.0
with:
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e8a26ca..98c8b25 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -20,7 +20,7 @@ jobs:
if: github.repository_owner == 'terraform-aws-modules'
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
diff --git a/.github/workflows/stale-actions.yaml b/.github/workflows/stale-actions.yaml
index c09ae1d..5037995 100644
--- a/.github/workflows/stale-actions.yaml
+++ b/.github/workflows/stale-actions.yaml
@@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- - uses: actions/stale@v4
+ - uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Staling issues and PR's
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a0925b0..74f3751 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
- rev: v1.68.1
+ rev: v1.76.0
hooks:
- id: terraform_fmt
- id: terraform_validate
@@ -23,7 +23,7 @@ repos:
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.2.0
+ rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: end-of-file-fixer
diff --git a/README.md b/README.md
index 8013b0c..27afb17 100644
--- a/README.md
+++ b/README.md
@@ -111,15 +111,15 @@ $ terraform apply
| Name | Version |
|------|---------|
-| [terraform](#requirement\_terraform) | >= 0.13.1 |
-| [aws](#requirement\_aws) | >= 3.73 |
+| [terraform](#requirement\_terraform) | >= 1.0 |
+| [aws](#requirement\_aws) | >= 4.0 |
| [random](#requirement\_random) | >= 2.0 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 3.73 |
+| [aws](#provider\_aws) | >= 4.0 |
## Modules
diff --git a/examples/complete/README.md b/examples/complete/README.md
index d22b886..bd777ce 100644
--- a/examples/complete/README.md
+++ b/examples/complete/README.md
@@ -20,15 +20,15 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
-| [terraform](#requirement\_terraform) | >= 0.13.1 |
-| [aws](#requirement\_aws) | >= 3.73 |
+| [terraform](#requirement\_terraform) | >= 1.0 |
+| [aws](#requirement\_aws) | >= 4.0 |
| [random](#requirement\_random) | >= 2.0 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 3.73 |
+| [aws](#provider\_aws) | >= 4.0 |
| [random](#provider\_random) | >= 2.0 |
## Modules
diff --git a/examples/complete/main.tf b/examples/complete/main.tf
index 8b1df4b..977ae65 100644
--- a/examples/complete/main.tf
+++ b/examples/complete/main.tf
@@ -60,7 +60,7 @@ module "acm" {
version = "~> 3"
domain_name = local.domain_name
- zone_id = coalescelist(data.aws_route53_zone.this.*.zone_id, aws_route53_zone.this.*.zone_id)[0]
+ zone_id = try(data.aws_route53_zone.this[0].zone_id, aws_route53_zone.this[0].zone_id)
subject_alternative_names = [
"*.alerts.${local.domain_name}",
diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf
index 9ce6d56..981f3b1 100644
--- a/examples/complete/versions.tf
+++ b/examples/complete/versions.tf
@@ -1,10 +1,10 @@
terraform {
- required_version = ">= 0.13.1"
+ required_version = ">= 1.0"
required_providers {
aws = {
source = "hashicorp/aws"
- version = ">= 3.73"
+ version = ">= 4.0"
}
random = {
source = "hashicorp/random"
diff --git a/outputs.tf b/outputs.tf
index 4fe2a11..1726a86 100644
--- a/outputs.tf
+++ b/outputs.tf
@@ -11,7 +11,7 @@ output "appsync_graphql_api_arn" {
output "appsync_graphql_api_uris" {
description = "Map of URIs associated with the API"
- value = try(aws_appsync_graphql_api.this.*.uris, null)
+ value = try(aws_appsync_graphql_api.this[0].uris, null)
}
# API Key
@@ -73,5 +73,5 @@ output "appsync_domain_hosted_zone_id" {
# Extra
output "appsync_graphql_api_fqdns" {
description = "Map of FQDNs associated with the API (no protocol and path)"
- value = length(aws_appsync_graphql_api.this) != 0 ? { for k, v in element(concat(aws_appsync_graphql_api.this.*.uris, [""]), 0) : k => regex("://([^/?#]*)?", v)[0] } : {}
+ value = { for k, v in try(aws_appsync_graphql_api.this[0].uris, "") : k => regex("://([^/?#]*)?", v)[0] if length(aws_appsync_graphql_api.this) > 0 }
}
diff --git a/versions.tf b/versions.tf
index 9ce6d56..981f3b1 100644
--- a/versions.tf
+++ b/versions.tf
@@ -1,10 +1,10 @@
terraform {
- required_version = ">= 0.13.1"
+ required_version = ">= 1.0"
required_providers {
aws = {
source = "hashicorp/aws"
- version = ">= 3.73"
+ version = ">= 4.0"
}
random = {
source = "hashicorp/random"