Skip to content

Commit 27f1d8a

Browse files
authored
feat: lookup for AMI that doesn't contain ECS/EKS agent and packages + enable setting volume size (#30)
* feat: trunk init * feat: look up the Amazon Linux 2023 Minimal AMI + enable setting volume size
1 parent 295c4f7 commit 27f1d8a

11 files changed

+180
-93
lines changed

.github/trunk-upgrade.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/checkout@v4
1919

2020
- name: Trunk Upgrade
21-
uses: trunk-io/trunk-action/upgrade@2eaee169140ec559bd556208f9f99cdfdf468da8 # v1.1.18
21+
uses: trunk-io/trunk-action/upgrade@4d5ecc89b2691705fd08c747c78652d2fc806a94 # v1.1.19
2222
with:
2323
base: main
2424
reviewers: "@masterpointio/masterpoint-internal"

.trunk/.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*out
2+
*logs
3+
*actions
4+
*notifications
5+
*tools
6+
plugins
7+
user_trunk.yaml
8+
user.yaml
9+
tmp

.trunk/configs/.checkov.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
skip-check:
2+
- CKV_TF_1 # Ensure module references are pinned to a commit SHA.

.trunk/configs/.markdownlint.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Autoformatter friendly markdownlint config (all formatting rules disabled)
2+
default: true
3+
blank_lines: false
4+
bullet: false
5+
html: false
6+
indentation: false
7+
line_length: false
8+
spaces: false
9+
url: false
10+
whitespace: false
11+
12+
# Ignore MD041/first-line-heading/first-line-h1
13+
# Error: First line in a file should be a top-level heading
14+
MD041: false

.trunk/configs/.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# `release-please` doesn't generate prettier compliant output, see relevant issues:
2+
# https://github.com/googleapis/release-please/issues/1902
3+
# https://github.com/googleapis/release-please/issues/1802
4+
CHANGELOG.md

.trunk/configs/.yamllint.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
rules:
2+
quoted-strings:
3+
required: only-when-needed
4+
extra-allowed: ["{|}"]
5+
empty-values:
6+
forbid-in-block-mappings: true
7+
forbid-in-flow-mappings: true
8+
key-duplicates: {}
9+
octal-values:
10+
forbid-implicit-octal: true

.trunk/trunk.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
2+
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
3+
version: 0.1
4+
cli:
5+
version: 1.22.8
6+
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
7+
plugins:
8+
sources:
9+
- id: trunk
10+
ref: v1.6.6
11+
uri: https://github.com/trunk-io/plugins
12+
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
13+
runtimes:
14+
enabled:
15+
16+
17+
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
18+
lint:
19+
enabled:
20+
21+
22+
23+
- git-diff-check
24+
25+
26+
27+
28+
29+
actions:
30+
enabled:
31+
- trunk-announce
32+
- trunk-check-pre-push
33+
- trunk-fmt-pre-commit
34+
- trunk-upgrade-available

README.md

+97-90
Large diffs are not rendered by default.

data.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ data "aws_ami" "amazon_linux_2023" {
88

99
filter {
1010
name = "name"
11-
values = ["al2023-ami*"]
11+
values = ["al2023-ami-2023*"]
1212
}
1313

1414
filter {

main.tf

+2-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ resource "aws_launch_template" "default" {
332332
block_device_mappings {
333333
device_name = "/dev/xvda"
334334
ebs {
335-
encrypted = true
335+
encrypted = true
336+
volume_size = var.volume_size
336337
}
337338
}
338339

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ variable "metadata_http_protocol_ipv6_enabled" {
9696
default = false
9797
}
9898

99+
variable "volume_size" {
100+
description = "The size of the volume in gigabytes."
101+
type = number
102+
default = null
103+
}
104+
99105
######################
100106
## SESSION LOGGING ##
101107
####################

0 commit comments

Comments
 (0)