Skip to content

Commit fe307ae

Browse files
authored
chore: Fix tf format and add Editor config (#12)
1 parent f701286 commit fe307ae

File tree

11 files changed

+95
-61
lines changed

11 files changed

+95
-61
lines changed

.editorconfig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
# Override for Makefile
11+
[{Makefile,makefile,GNUmakefile}]
12+
indent_style = tab
13+
indent_size = 4
14+
15+
[Makefile.*]
16+
indent_style = tab
17+
indent_size = 4
18+
19+
[{*.yaml,*.yml,*.md}]
20+
indent_style = space
21+
indent_size = 2
22+
23+
[*.sh]
24+
indent_style = tab
25+
indent_size = 2
26+
27+
[*.{tf,tfvars,tpl,variant}]
28+
indent_style = space
29+
indent_size = 2
30+
31+
[*.json]
32+
insert_final_newline = false

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"extends": [
44
"config:base"
55
]
6-
}
6+
}

.github/settings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ repository:
55
description: This component is responsible for provisioning EC2 instances for GitHub runners
66
homepage: https://cloudposse.com/accelerate
77
topics: terraform, terraform-component
8+

README.md

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ description: |-
170170
#### Workflow Permissions
171171
172172
1. Browse to
173-
[https://github.com/organizations/{Org}/settings/actions](https://github.com/organizations/{Org}/settings/actions)
174-
(Organization) or
175-
[https://github.com/{Org}/{Repo}/settings/actions](https://github.com/{Org}/{Repo}/settings/actions) (Repository)
173+
[https://github.com/organizations/{Org}/settings/actions](https://github.com/organizations/{Org}/settings/actions)
174+
(Organization) or
175+
[https://github.com/{Org}/{Repo}/settings/actions](https://github.com/{Org}/{Repo}/settings/actions) (Repository)
176176
177177
2. Set the default permissions for the GITHUB_TOKEN to Read Only
178178
@@ -217,10 +217,10 @@ description: |-
217217
and skip the rest. Otherwise, complete the private key setup in `core-<default-region>-auto`.
218218
219219
1. Convert the private key to a PEM file using the following command:
220-
`openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in {DOWNLOADED_FILE_NAME}.pem -out private-key-pkcs8.key`
220+
`openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in {DOWNLOADED_FILE_NAME}.pem -out private-key-pkcs8.key`
221221
1. Upload PEM file key to the specified ssm path: `/github/runners/acme/private-key` in `core-<default-region>-auto`
222222
1. Create another sensitive SSM parameter `/github/runners/acme/registration-token` in `core-<default-region>-auto` with
223-
any basic value, such as "foo". This will be overwritten by the rotator.
223+
any basic value, such as "foo". This will be overwritten by the rotator.
224224
1. Update the GitHub App ID and Installation ID in the `github-action-token-rotator` catalog.
225225
226226
> [!TIP]
@@ -230,21 +230,21 @@ description: |-
230230
#### (ClickOps) Obtain the Runner Registration Token
231231
232232
1. Browse to
233-
[https://github.com/organizations/{Org}/settings/actions/runners](https://github.com/organizations/{Org}/settings/actions/runners)
234-
(Organization) or
235-
[https://github.com/{Org}/{Repo}/settings/actions/runners](https://github.com/{Org}/{Repo}/settings/actions/runners)
236-
(Repository)
233+
[https://github.com/organizations/{Org}/settings/actions/runners](https://github.com/organizations/{Org}/settings/actions/runners)
234+
(Organization) or
235+
[https://github.com/{Org}/{Repo}/settings/actions/runners](https://github.com/{Org}/{Repo}/settings/actions/runners)
236+
(Repository)
237237
238238
2. Click the **New Runner** button (Organization) or **New Self Hosted Runner** button (Repository)
239239
240240
3. Copy the Github Runner token from the next screen. Note that this is the only time you will see this token. Note that
241-
if you exit the `New {Self Hosted} Runner` screen and then later return by clicking the `New {Self Hosted} Runner`
242-
button again, the registration token will be invalidated and a new token will be generated.
241+
if you exit the `New {Self Hosted} Runner` screen and then later return by clicking the `New {Self Hosted} Runner`
242+
button again, the registration token will be invalidated and a new token will be generated.
243243
244244
<img src="/assets/refarch/cleanshot-2022-03-01-at-16.12.26-20220302-005927.png" height="1010" width="833" /><br/>
245245
246246
4. Add the `REGISTRATION_TOKEN` to the `/github/token` SSM parameter in the account where Github runners are hosted
247-
(usually `automation`), encrypted with KMS.
247+
(usually `automation`), encrypted with KMS.
248248
249249
```
250250
chamber write github token <value>
@@ -262,11 +262,11 @@ description: |-
262262
following tips:
263263
264264
1. The private key is stored at the given parameter path:
265-
`parameter_store_private_key_path: /github/runners/acme/private-key`
265+
`parameter_store_private_key_path: /github/runners/acme/private-key`
266266
1. The private key is Base 64 encoded. If you pull the key from SSM and decode it, it should begin with
267-
`-----BEGIN PRIVATE KEY-----`
267+
`-----BEGIN PRIVATE KEY-----`
268268
1. If the private key has changed, you must _redeploy_ `github-action-token-rotator`. Run a plan against the component
269-
to make sure there are not changes required.
269+
to make sure there are not changes required.
270270
271271
## The GitHub Registration Token is valid, but the Runners are not registering with GitHub
272272

docs/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src/README.md

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/context.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ variable "descriptor_formats" {
264264
Describe additional descriptors to be output in the `descriptors` output map.
265265
Map of maps. Keys are names of descriptors. Values are maps of the form
266266
`{
267-
format = string
268-
labels = list(string)
267+
format = string
268+
labels = list(string)
269269
}`
270270
(Type is `any` so the map values can later be enhanced to provide additional options.)
271271
`format` is a Terraform format string to be passed to the `format()` function.

src/modules/graceful_scale_in/context.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ variable "descriptor_formats" {
264264
Describe additional descriptors to be output in the `descriptors` output map.
265265
Map of maps. Keys are names of descriptors. Values are maps of the form
266266
`{
267-
format = string
268-
labels = list(string)
267+
format = string
268+
labels = list(string)
269269
}`
270270
(Type is `any` so the map values can later be enhanced to provide additional options.)
271271
`format` is a Terraform format string to be passed to the `format()` function.

src/templates/amazon-cloudwatch-agent.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@
134134
},
135135
"force_flush_interval": 15
136136
}
137-
}
137+
}

0 commit comments

Comments
 (0)