Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Terraform 0.14 upgrade #32

Merged
merged 1 commit into from
Jan 6, 2021
Merged
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
8 changes: 0 additions & 8 deletions .github/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,3 @@ change-template: |

template: |
$CHANGES

replacers:
# Remove irrelevant information from Renovate bot
- search: '/---\s+^#.*Renovate configuration(?:.|\n)*?This PR has been generated .*/gm'
replace: ''
# Remove Renovate bot banner image
- search: '/\[!\[[^\]]*Renovate\][^\]]*\](\([^)]*\))?\s*\n+/gm'
replace: ''
28 changes: 11 additions & 17 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# https://docs.mergify.io/conditions.html
# https://docs.mergify.io/actions.html
pull_request_rules:
- name: "approve automated PRs that have passed checks"
conditions:
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
- "check-success~=test/bats"
- "check-success~=test/readme"
- "check-success~=test/terratest"
- "base=master"
- "-closed"
- "head~=^(auto-update|renovate)/.*"
- "check-success=test/bats"
- "check-success=test/readme"
- "check-success=test/terratest"
- "check-success=validate-codeowners"
- "author=cloudpossebot"
- "head~=auto-update/.*"
actions:
review:
type: "APPROVE"
Expand All @@ -19,17 +15,16 @@ pull_request_rules:

- name: "merge automated PRs when approved and tests pass"
conditions:
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
- "check-success~=test/bats"
- "check-success~=test/readme"
- "check-success~=test/terratest"
- "base=master"
- "-closed"
- "head~=^(auto-update|renovate)/.*"
- "check-success=test/bats"
- "check-success=test/readme"
- "check-success=test/terratest"
- "check-success=validate-codeowners"
- "head~=auto-update/.*"
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- "#commented-reviews-by=0"
- "base=master"
- "author=cloudpossebot"
actions:
merge:
method: "squash"
Expand All @@ -43,7 +38,6 @@ pull_request_rules:
- name: "ask to resolve conflict"
conditions:
- "conflict"
- "-closed"
actions:
comment:
message: "This pull request is now in conflict. Could you fix it @{{author}}? 🙏"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-context.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
fi

- name: Create Pull Request
if: steps.update.outputs.create_pull_request == 'true'
if: {{ steps.update.outputs.create_pull_request == 'true' }}
uses: cloudposse/actions/github/[email protected]
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/auto-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "auto-readme"
on:
schedule:
# Update README.md nightly
- cron: '0 4 * * *'

jobs:
update:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Update readme
shell: bash
id: update
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
make init
make readme/build

- name: Create Pull Request
uses: cloudposse/actions/github/[email protected]
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
commit-message: Update README.md and docs
title: Update README.md and docs
body: |-
## what
This is an auto-generated PR that updates the README.md and docs

## why
To have most recent changes of README.md and doc from origin templates

branch: auto-update/readme
base: master
delete-branch: true
labels: |
auto-update
readme
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master

jobs:
publish:
semver:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/validate-codeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ jobs:
- name: "Checkout source code at current commit"
uses: actions/checkout@v2
- uses: mszostok/[email protected]
if: github.event.pull_request.head.repo.full_name == github.repository
name: "Full check of CODEOWNERS"
with:
# For now, remove "files" check to allow CODEOWNERS to specify non-existent
# files so we can use the same CODEOWNERS file for Terraform and non-Terraform repos
# checks: "files,syntax,owners,duppatterns"
checks: "syntax,owners,duppatterns"
# GitHub access token is required only if the `owners` check is enabled
github_access_token: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
- uses: mszostok/[email protected]
if: github.event.pull_request.head.repo.full_name != github.repository
name: "Syntax check of CODEOWNERS"
with:
checks: "syntax,duppatterns"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Available targets:

| Name | Version |
|------|---------|
| terraform | >= 0.12.0 |
| terraform | >= 0.12.26 |
| aws | >= 2.0 |
| local | >= 1.2 |

Expand Down Expand Up @@ -217,7 +217,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

## Copyright

Copyright © 2017-2020 [Cloud Posse, LLC](https://cpco.io/copyright)
Copyright © 2017-2021 [Cloud Posse, LLC](https://cpco.io/copyright)



Expand Down
2 changes: 1 addition & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

| Name | Version |
|------|---------|
| terraform | >= 0.12.0 |
| terraform | >= 0.12.26 |
| aws | >= 2.0 |
| local | >= 1.2 |

Expand Down
12 changes: 9 additions & 3 deletions examples/complete/versions.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
terraform {
required_version = ">= 0.12.0"
required_version = ">= 0.12.26"

required_providers {
aws = ">= 2.0"
local = ">= 1.2"
aws = {
source = "hashicorp/aws"
version = ">= 2.0"
}
local = {
source = "hashicorp/local"
version = ">= 1.2"
}
}
}
12 changes: 9 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
terraform {
required_version = ">= 0.12.0"
required_version = ">= 0.12.26"

required_providers {
aws = ">= 2.0"
local = ">= 1.2"
aws = {
source = "hashicorp/aws"
version = ">= 2.0"
}
local = {
source = "hashicorp/local"
version = ">= 1.2"
}
}
}