Skip to content

Commit 92be854

Browse files
authored
Security group updates (cloudposse#43)
1 parent f2de73a commit 92be854

16 files changed

+1400
-307
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ 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.6.0
1414
if: github.event.pull_request.head.repo.full_name == github.repository
1515
name: "Full check of CODEOWNERS"
1616
with:
@@ -20,7 +20,7 @@ jobs:
2020
checks: "syntax,owners,duppatterns"
2121
# GitHub access token is required only if the `owners` check is enabled
2222
github_access_token: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
23-
- uses: mszostok/codeowners-validator@v0.5.0
23+
- uses: mszostok/codeowners-validator@v0.6.0
2424
if: github.event.pull_request.head.repo.full_name != github.repository
2525
name: "Syntax check of CODEOWNERS"
2626
with:

README.md

Lines changed: 55 additions & 25 deletions
Large diffs are not rendered by default.

README.yaml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,34 +53,45 @@ usage: |2-
5353
region = var.region
5454
}
5555
56-
module "vpc" {
57-
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.8.1"
56+
module "this" {
57+
source = "cloudposse/label/null"
58+
# Cloud Posse recommends pinning every module to a specific version
59+
# version = "x.x.x"
5860
namespace = var.namespace
5961
stage = var.stage
6062
name = var.name
63+
}
64+
65+
module "vpc" {
66+
source = "cloudposse/vpc/aws"
67+
# Cloud Posse recommends pinning every module to a specific version
68+
# version = "x.x.x"
69+
6170
cidr_block = "172.16.0.0/16"
71+
72+
context = module.this.context
6273
}
6374
6475
module "subnets" {
65-
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.18.1"
76+
source = "cloudposse/dynamic-subnets/aws"
77+
# Cloud Posse recommends pinning every module to a specific version
78+
# version = "x.x.x"
79+
6680
availability_zones = var.availability_zones
67-
namespace = var.namespace
68-
stage = var.stage
69-
name = var.name
7081
vpc_id = module.vpc.vpc_id
7182
igw_id = module.vpc.igw_id
7283
cidr_block = module.vpc.vpc_cidr_block
73-
nat_gateway_enabled = false
84+
nat_gateway_enabled = true
7485
nat_instance_enabled = false
86+
87+
context = module.this.context
7588
}
7689
7790
module "memcached" {
7891
source = "cloudposse/elasticache-memcached/aws"
7992
# Cloud Posse recommends pinning every module to a specific version
8093
# version = "x.x.x"
81-
namespace = var.namespace
82-
stage = var.stage
83-
name = var.name
94+
8495
availability_zones = var.availability_zones
8596
vpc_id = module.vpc.vpc_id
8697
allowed_security_groups = [module.vpc.vpc_default_security_group_id]
@@ -90,10 +101,14 @@ usage: |2-
90101
engine_version = var.engine_version
91102
apply_immediately = true
92103
zone_id = var.zone_id
104+
105+
elasticache_parameter_group_family = var.elasticache_parameter_group_family
106+
107+
context = module.this.context
93108
}
94109
```
95110
examples: |-
96-
Review the [complete example](examples/simple) to see how to use this module.
111+
Review the [complete example](examples/complete) to see how to use this module.
97112
include:
98113
- "docs/targets.md"
99114
- "docs/terraform.md"
@@ -105,3 +120,5 @@ contributors:
105120
github: "aknysh"
106121
- name: "Erik Osterman"
107122
github: "osterman"
123+
- name: "Dan Meyers"
124+
github: "danjbh"

0 commit comments

Comments
 (0)