Skip to content

Commit 5641f58

Browse files
authored
requested features, general updates (#110)
1 parent 8d41552 commit 5641f58

File tree

18 files changed

+807
-389
lines changed

18 files changed

+807
-389
lines changed

.github/workflows/auto-context.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
3636
- name: Create Pull Request
3737
if: steps.update.outputs.create_pull_request == 'true'
38-
uses: cloudposse/actions/github/create-pull-request@0.22.0
38+
uses: cloudposse/actions/github/create-pull-request@0.30.0
3939
with:
4040
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
4141
committer: 'cloudpossebot <[email protected]>'

.github/workflows/auto-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
fi
6363
6464
- name: Auto Test
65-
uses: cloudposse/actions/github/repository-dispatch@0.22.0
65+
uses: cloudposse/actions/github/repository-dispatch@0.30.0
6666
# match users by ID because logins (user names) are inconsistent,
6767
# for example in the REST API Renovate Bot is `renovate[bot]` but
6868
# in GraphQL it is just `renovate`, plus there is a non-bot

.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/chatops.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111
- name: "Handle common commands"
12-
uses: cloudposse/actions/github/slash-command-dispatch@0.22.0
12+
uses: cloudposse/actions/github/slash-command-dispatch@0.30.0
1313
with:
1414
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
1515
reaction-token: ${{ secrets.GITHUB_TOKEN }}
@@ -24,7 +24,7 @@ jobs:
2424
- name: "Checkout commit"
2525
uses: actions/checkout@v2
2626
- name: "Run tests"
27-
uses: cloudposse/actions/github/slash-command-dispatch@0.22.0
27+
uses: cloudposse/actions/github/slash-command-dispatch@0.30.0
2828
with:
2929
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
3030
reaction-token: ${{ secrets.GITHUB_TOKEN }}

.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"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ Available targets:
355355
| <a name="output_eks_node_group_arn"></a> [eks\_node\_group\_arn](#output\_eks\_node\_group\_arn) | Amazon Resource Name (ARN) of the EKS Node Group |
356356
| <a name="output_eks_node_group_cbd_pet_name"></a> [eks\_node\_group\_cbd\_pet\_name](#output\_eks\_node\_group\_cbd\_pet\_name) | The pet name of this node group, if this module generated one |
357357
| <a name="output_eks_node_group_id"></a> [eks\_node\_group\_id](#output\_eks\_node\_group\_id) | EKS Cluster name and EKS Node Group name separated by a colon |
358+
| <a name="output_eks_node_group_launch_template_id"></a> [eks\_node\_group\_launch\_template\_id](#output\_eks\_node\_group\_launch\_template\_id) | The ID of the launch template used for this node group |
359+
| <a name="output_eks_node_group_launch_template_name"></a> [eks\_node\_group\_launch\_template\_name](#output\_eks\_node\_group\_launch\_template\_name) | The name of the launch template used for this node group |
358360
| <a name="output_eks_node_group_remote_access_security_group_id"></a> [eks\_node\_group\_remote\_access\_security\_group\_id](#output\_eks\_node\_group\_remote\_access\_security\_group\_id) | The ID of the security group generated to allow SSH access to the nodes, if this module generated one |
359361
| <a name="output_eks_node_group_resources"></a> [eks\_node\_group\_resources](#output\_eks\_node\_group\_resources) | List of objects containing information about underlying resources of the EKS Node Group |
360362
| <a name="output_eks_node_group_role_arn"></a> [eks\_node\_group\_role\_arn](#output\_eks\_node\_group\_role\_arn) | ARN of the worker nodes IAM role |

docs/terraform.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@
111111
| <a name="output_eks_node_group_arn"></a> [eks\_node\_group\_arn](#output\_eks\_node\_group\_arn) | Amazon Resource Name (ARN) of the EKS Node Group |
112112
| <a name="output_eks_node_group_cbd_pet_name"></a> [eks\_node\_group\_cbd\_pet\_name](#output\_eks\_node\_group\_cbd\_pet\_name) | The pet name of this node group, if this module generated one |
113113
| <a name="output_eks_node_group_id"></a> [eks\_node\_group\_id](#output\_eks\_node\_group\_id) | EKS Cluster name and EKS Node Group name separated by a colon |
114+
| <a name="output_eks_node_group_launch_template_id"></a> [eks\_node\_group\_launch\_template\_id](#output\_eks\_node\_group\_launch\_template\_id) | The ID of the launch template used for this node group |
115+
| <a name="output_eks_node_group_launch_template_name"></a> [eks\_node\_group\_launch\_template\_name](#output\_eks\_node\_group\_launch\_template\_name) | The name of the launch template used for this node group |
114116
| <a name="output_eks_node_group_remote_access_security_group_id"></a> [eks\_node\_group\_remote\_access\_security\_group\_id](#output\_eks\_node\_group\_remote\_access\_security\_group\_id) | The ID of the security group generated to allow SSH access to the nodes, if this module generated one |
115117
| <a name="output_eks_node_group_resources"></a> [eks\_node\_group\_resources](#output\_eks\_node\_group\_resources) | List of objects containing information about underlying resources of the EKS Node Group |
116118
| <a name="output_eks_node_group_role_arn"></a> [eks\_node\_group\_role\_arn](#output\_eks\_node\_group\_role\_arn) | ARN of the worker nodes IAM role |

examples/complete/main.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ locals {
5555

5656
module "vpc" {
5757
source = "cloudposse/vpc/aws"
58-
version = "0.25.0"
58+
version = "0.28.1"
5959

6060
cidr_block = var.vpc_cidr_block
6161
tags = local.tags
@@ -65,7 +65,7 @@ module "vpc" {
6565

6666
module "subnets" {
6767
source = "cloudposse/dynamic-subnets/aws"
68-
version = "0.39.4"
68+
version = "0.39.8"
6969

7070
availability_zones = var.availability_zones
7171
vpc_id = module.vpc.vpc_id
@@ -80,7 +80,7 @@ module "subnets" {
8080

8181
module "ssh_source_access" {
8282
source = "cloudposse/security-group/aws"
83-
version = "0.4.0"
83+
version = "0.4.3"
8484

8585
attributes = ["ssh", "source"]
8686
security_group_description = "Test source security group ssh access only"
@@ -97,7 +97,7 @@ module "ssh_source_access" {
9797

9898
module "https_sg" {
9999
source = "cloudposse/security-group/aws"
100-
version = "0.4.0"
100+
version = "0.4.3"
101101

102102
attributes = ["http"]
103103
security_group_description = "Allow http access"
@@ -114,7 +114,7 @@ module "https_sg" {
114114

115115
module "eks_cluster" {
116116
source = "cloudposse/eks-cluster/aws"
117-
version = "0.43.2"
117+
version = "0.45.0"
118118

119119
region = var.region
120120
vpc_id = module.vpc.vpc_id
@@ -162,7 +162,7 @@ module "eks_node_group" {
162162

163163
# Ensure ordering of resource creation to eliminate the race conditions when applying the Kubernetes Auth ConfigMap.
164164
# Do not create Node Group before the EKS cluster is created and the `aws-auth` Kubernetes ConfigMap is applied.
165-
depends_on = [module.eks_cluster.kubernetes_config_map_id]
165+
depends_on = [module.eks_cluster, module.eks_cluster.kubernetes_config_map_id]
166166

167167
create_before_destroy = true
168168

examples/complete/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,8 @@ output "eks_node_group_cbd_pet_name" {
9292
description = "The pet name of this node group, if this module generated one"
9393
value = module.eks_node_group.eks_node_group_cbd_pet_name
9494
}
95+
96+
97+
output "eks_node_group_launch_template_id" {
98+
value = module.eks_node_group.eks_node_group_launch_template_id
99+
}

main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ locals {
99
have_ssh_key = local.enabled && length(var.ec2_ssh_key_name) == 1
1010
ec2_ssh_key_name = local.have_ssh_key ? var.ec2_ssh_key_name[0] : null
1111

12-
need_remote_access_sg = local.enabled && local.have_ssh_key && local.generate_launch_template
12+
need_ssh_access_sg = local.enabled && (local.have_ssh_key || length(var.ssh_access_security_group_ids) > 0) && local.generate_launch_template
1313

14-
get_cluster_data = local.enabled ? (local.need_cluster_kubernetes_version || local.need_bootstrap || local.need_remote_access_sg || length(var.associated_security_group_ids) > 0) : false
14+
get_cluster_data = local.enabled ? (local.need_cluster_kubernetes_version || local.need_bootstrap || local.need_ssh_access_sg || length(var.associated_security_group_ids) > 0) : false
1515

1616
autoscaler_enabled = var.cluster_autoscaler_enabled
1717
#
@@ -93,6 +93,8 @@ resource "random_pet" "cbd" {
9393
instance_types = join(",", local.ng.instance_types)
9494
ami_type = local.ng.ami_type
9595
capacity_type = local.ng.capacity_type
96+
97+
launch_template_id = local.launch_template_id
9698
}
9799
}
98100

0 commit comments

Comments
 (0)