Skip to content

Commit 03a9738

Browse files
authored
Upgrade to v4 aws provider (#131)
1 parent f61532b commit 03a9738

File tree

15 files changed

+526
-199
lines changed

15 files changed

+526
-199
lines changed

.github/workflows/auto-readme.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "auto-readme"
2+
on:
3+
schedule:
4+
# Example of job definition:
5+
# .---------------- minute (0 - 59)
6+
# | .------------- hour (0 - 23)
7+
# | | .---------- day of month (1 - 31)
8+
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
9+
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
10+
# | | | | |
11+
# * * * * * user-name command to be executed
12+
13+
# Update README.md nightly at 4am UTC
14+
- cron: '0 4 * * *'
15+
16+
jobs:
17+
update:
18+
if: github.event_name == 'schedule'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Update readme
24+
shell: bash
25+
id: update
26+
env:
27+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
28+
run: |
29+
make init
30+
make readme/build
31+
# Ignore changes if they are only whitespace
32+
git diff --ignore-all-space --ignore-blank-lines --quiet README.md && { git restore README.md; echo Ignoring whitespace-only changes in README; }
33+
34+
- name: Create Pull Request
35+
# This action will not create or change a pull request if there are no changes to make.
36+
# If a PR of the auto-update/readme branch is open, this action will just update it, not create a new PR.
37+
uses: cloudposse/actions/github/[email protected]
38+
with:
39+
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
40+
commit-message: Update README.md and docs
41+
title: Update README.md and docs
42+
body: |-
43+
## what
44+
This is an auto-generated PR that updates the README.md and docs
45+
46+
## why
47+
To have most recent changes of README.md and doc from origin templates
48+
49+
branch: auto-update/readme
50+
base: main
51+
delete-branch: true
52+
labels: |
53+
auto-update
54+
no-release
55+
readme

.github/workflows/validate-codeowners.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,20 @@ jobs:
1010
steps:
1111
- name: "Checkout source code at current commit"
1212
uses: actions/checkout@v2
13-
- uses: mszostok/codeowners-validator@v0.5.0
13+
- uses: mszostok/codeowners-validator@v0.7.1
1414
if: github.event.pull_request.head.repo.full_name == github.repository
1515
name: "Full check of CODEOWNERS"
1616
with:
1717
# For now, remove "files" check to allow CODEOWNERS to specify non-existent
1818
# files so we can use the same CODEOWNERS file for Terraform and non-Terraform repos
1919
# checks: "files,syntax,owners,duppatterns"
2020
checks: "syntax,owners,duppatterns"
21+
owner_checker_allow_unowned_patterns: "false"
2122
# GitHub access token is required only if the `owners` check is enabled
2223
github_access_token: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
23-
- uses: mszostok/codeowners-validator@v0.5.0
24+
- uses: mszostok/codeowners-validator@v0.7.1
2425
if: github.event.pull_request.head.repo.full_name != github.repository
2526
name: "Syntax check of CODEOWNERS"
2627
with:
2728
checks: "syntax,duppatterns"
29+
owner_checker_allow_unowned_patterns: "false"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@
1313
# Build harness files
1414
.build-harness
1515
build-harness
16+
17+
# Editor and merge files
18+
*.orig
19+
*.draft
20+
*~

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SHELL := /bin/bash
2-
export TERRAFORM_VERSION = 0.12.3
2+
export TERRAFORM_VERSION = 1.1.6
33

44
# List of targets the `readme` target should call before generating the readme
55
export README_DEPS ?= docs/targets.md docs/terraform.md

README.md

Lines changed: 20 additions & 6 deletions
Large diffs are not rendered by default.

docs/terraform.md

Lines changed: 20 additions & 6 deletions
Large diffs are not rendered by default.

examples/complete/variables.tf

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ variable "grants" {
1818

1919
variable "lifecycle_rules" {
2020
type = list(object({
21-
enabled = bool
2221
prefix = string
22+
enabled = bool
2323
tags = map(string)
2424

2525
enable_glacier_transition = bool
@@ -39,8 +39,8 @@ variable "lifecycle_rules" {
3939
expiration_days = number
4040
}))
4141
default = [{
42-
enabled = false
4342
prefix = ""
43+
enabled = false
4444
tags = {}
4545

4646
enable_glacier_transition = true
@@ -72,7 +72,13 @@ variable "s3_replication_enabled" {
7272
variable "policy" {
7373
type = string
7474
default = ""
75-
description = "A valid bucket policy JSON document. Note that if the policy document is not specific enough (but still valid), Terraform may view the policy as constantly changing in a terraform plan. In this case, please make sure you use the verbose/specific version of the policy"
75+
description = "DEPRECATED: Use source_policy_documents instead. A valid bucket policy JSON document. Note that if the policy document is not specific enough (but still valid), Terraform may view the policy as constantly changing in a terraform plan. In this case, please make sure you use the verbose/specific version of the policy"
76+
}
77+
78+
variable "source_policy_documents" {
79+
type = list(string)
80+
default = null
81+
description = "List of IAM policy documents that are merged together into the exported document. Statements defined in source_policy_documents or source_json must have unique sids. Statements with the same sid from documents assigned to the override_json and override_policy_documents arguments will override source statements."
7682
}
7783

7884
variable "region" {
@@ -256,4 +262,4 @@ variable "bucket_key_enabled" {
256262
257263
For more information, see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html
258264
EOT
259-
}
265+
}

examples/complete/versions.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
terraform {
2+
required_version = ">= 0.13.0"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = ">= 4.0.0"
8+
}
9+
time = {
10+
source = "hashicorp/time"
11+
version = ">= 0.7"
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)