Skip to content

Commit 0443a09

Browse files
author
jsf9k
committed
# Conflicts: # README.md # examples/basic_usage/README.md
2 parents 242bb96 + a56d4c9 commit 0443a09

File tree

10 files changed

+124
-55
lines changed

10 files changed

+124
-55
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: # yamllint disable-line rule:truthy
55
merge_group:
66
types:
77
- checks_requested
8+
# We use the default activity types for the pull_request event as specified here:
9+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
810
pull_request:
911
push:
1012
repository_dispatch:
@@ -23,7 +25,7 @@ env:
2325
PIP_CACHE_DIR: ~/.cache/pip
2426
PRE_COMMIT_CACHE_DIR: ~/.cache/pre-commit
2527
RUN_TMATE: ${{ secrets.RUN_TMATE }}
26-
TERRAFORM_DOCS_REPO_BRANCH_NAME: improvement/support_atx_closed_markdown_headers
28+
TERRAFORM_DOCS_REPO_BRANCH_NAME: cisagov
2729
TERRAFORM_DOCS_REPO_DEPTH: 1
2830
TERRAFORM_DOCS_REPO_URL: https://github.com/mcdonnnj/terraform-docs.git
2931

@@ -118,18 +120,20 @@ jobs:
118120
name: Lookup Go cache directory
119121
run: |
120122
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
121-
- uses: actions/cache@v4
123+
- uses: actions/cache@v5
122124
env:
123-
BASE_CACHE_KEY: ${{ github.job }}-${{ runner.os }}-\
124-
py${{ steps.setup-python.outputs.python-version }}-\
125-
go${{ steps.setup-go.outputs.go-version }}-\
126-
packer${{ steps.setup-env.outputs.packer-version }}-\
127-
tf${{ steps.setup-env.outputs.terraform-version }}-
125+
BASE_CACHE_KEY: >-
126+
${{ github.job }}-${{ runner.os
127+
}}-py${{ steps.setup-python.outputs.python-version
128+
}}-go${{ steps.setup-go.outputs.go-version
129+
}}-packer${{ steps.setup-env.outputs.packer-version
130+
}}-tf${{ steps.setup-env.outputs.terraform-version }}-
128131
with:
129-
key: ${{ env.BASE_CACHE_KEY }}\
130-
${{ hashFiles('**/requirements-test.txt') }}-\
131-
${{ hashFiles('**/requirements.txt') }}-\
132-
${{ hashFiles('**/.pre-commit-config.yaml') }}
132+
key: >-
133+
${{ env.BASE_CACHE_KEY }}${{
134+
hashFiles('**/requirements-test.txt') }}-${{
135+
hashFiles('**/requirements.txt') }}-${{
136+
hashFiles('**/.pre-commit-config.yaml') }}
133137
# Note that the .terraform directory IS NOT included in the
134138
# cache because if we were caching, then we would need to use
135139
# the `-upgrade=true` option. This option blindly pulls down the
@@ -169,10 +173,13 @@ jobs:
169173
PACKAGE_VERSION: ${{ steps.setup-env.outputs.staticcheck-version }}
170174
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
171175
# TODO: https://github.com/cisagov/skeleton-generic/issues/165
172-
# We are temporarily using @mcdonnnj's forked branch of terraform-docs
173-
# until his PR: https://github.com/terraform-docs/terraform-docs/pull/745
174-
# is approved. This temporary fix will allow for ATX header support when
175-
# terraform-docs is run during linting.
176+
# We are temporarily using a branch of @mcdonnnj's fork of terraform-docs that
177+
# groups changes from his PRs until they are approved and merged:
178+
# https://github.com/terraform-docs/terraform-docs/pull/745
179+
# https://github.com/terraform-docs/terraform-docs/pull/901
180+
# This temporary fix will allow for ATX header support when terraform-docs is run
181+
# during linting and output delimiter rows with cell spacing that passes
182+
# Markdownlint's MD060/table-column-style rule.
176183
- name: Clone ATX headers branch from terraform-docs fork
177184
run: |
178185
git clone \
@@ -187,7 +194,7 @@ jobs:
187194
-o $(go env GOPATH)/bin/terraform-docs
188195
- name: Install dependencies
189196
run: |
190-
python -m pip install --upgrade pip setuptools wheel
197+
python -m pip install --upgrade pip setuptools
191198
pip install --upgrade --requirement requirements-test.txt
192199
- name: Set up pre-commit hook environments
193200
run: pre-commit install-hooks

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
merge_group:
1313
types:
1414
- checks_requested
15+
# We use the default activity types for the pull_request event as specified here:
16+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
1517
pull_request:
1618
# The branches here must be a subset of the ones in the push key
1719
branches:

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: # yamllint disable-line rule:truthy
55
merge_group:
66
types:
77
- checks_requested
8+
# We use the default activity types for the pull_request event as specified here:
9+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
810
pull_request:
911

1012
# Set a default shell for any run steps. The `-Eueo pipefail` sets errtrace,

.github/workflows/label-prs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
name: Label pull requests
33

44
on: # yamllint disable-line rule:truthy
5+
# We use the default activity types for the pull_request event as specified here:
6+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
57
pull_request:
6-
types:
7-
- edited
8-
- opened
9-
- synchronize
108

119
# Set a default shell for any run steps. The `-Eueo pipefail` sets errtrace,
1210
# nounset, errexit, and pipefail. The `-x` will print all commands as they are

.pre-commit-config.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,32 +45,32 @@ repos:
4545

4646
# Text file hooks
4747
- repo: https://github.com/igorshubovych/markdownlint-cli
48-
rev: v0.45.0
48+
rev: v0.47.0
4949
hooks:
5050
- id: markdownlint
5151
args:
5252
- --config=.mdl_config.yaml
5353
- repo: https://github.com/rbubley/mirrors-prettier
54-
rev: v3.6.2
54+
rev: v3.8.1
5555
hooks:
5656
- id: prettier
5757
- repo: https://github.com/adrienverge/yamllint
58-
rev: v1.37.1
58+
rev: v1.38.0
5959
hooks:
6060
- id: yamllint
6161
args:
6262
- --strict
6363

6464
# GitHub Actions hooks
6565
- repo: https://github.com/python-jsonschema/check-jsonschema
66-
rev: 0.35.0
66+
rev: 0.36.2
6767
hooks:
6868
- id: check-github-actions
6969
- id: check-github-workflows
7070

7171
# pre-commit hooks
7272
- repo: https://github.com/pre-commit/pre-commit
73-
rev: v4.4.0
73+
rev: v4.5.1
7474
hooks:
7575
- id: validate_manifest
7676

@@ -129,13 +129,13 @@ repos:
129129

130130
# Python hooks
131131
- repo: https://github.com/PyCQA/bandit
132-
rev: 1.9.1
132+
rev: 1.9.3
133133
hooks:
134134
- id: bandit
135135
args:
136136
- --config=.bandit.yml
137137
- repo: https://github.com/psf/black-pre-commit-mirror
138-
rev: 25.11.0
138+
rev: 26.1.0
139139
hooks:
140140
- id: black
141141
- repo: https://github.com/PyCQA/flake8
@@ -145,15 +145,15 @@ repos:
145145
additional_dependencies:
146146
- flake8-docstrings==1.7.0
147147
- repo: https://github.com/PyCQA/isort
148-
rev: 7.0.0
148+
rev: 8.0.0
149149
hooks:
150150
- id: isort
151151
- repo: https://github.com/pre-commit/mirrors-mypy
152-
rev: v1.18.2
152+
rev: v1.19.1
153153
hooks:
154154
- id: mypy
155155
- repo: https://github.com/pypa/pip-audit
156-
rev: v2.9.0
156+
rev: v2.10.0
157157
hooks:
158158
- id: pip-audit
159159
args:
@@ -165,7 +165,7 @@ repos:
165165
- --requirement
166166
- requirements.txt
167167
- repo: https://github.com/asottile/pyupgrade
168-
rev: v3.21.1
168+
rev: v3.21.2
169169
hooks:
170170
- id: pyupgrade
171171
args:
@@ -177,7 +177,7 @@ repos:
177177

178178
# Ansible hooks
179179
- repo: https://github.com/ansible/ansible-lint
180-
rev: v25.11.1
180+
rev: v26.1.1
181181
hooks:
182182
- id: ansible-lint
183183
additional_dependencies:
@@ -203,7 +203,7 @@ repos:
203203

204204
# Terraform hooks
205205
- repo: https://github.com/antonbabenko/pre-commit-terraform
206-
rev: v1.103.0
206+
rev: v1.105.0
207207
hooks:
208208
- id: terraform_fmt
209209
- id: terraform_validate

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ This meta-role requires a permission policy similar to the following:
7676
## Requirements ##
7777

7878
| Name | Version |
79-
|------|---------|
79+
| ---- | ------- |
8080
| terraform | >= 1.1 |
8181
| aws | >= 4.9 |
8282

8383
## Providers ##
8484

8585
| Name | Version |
86-
|------|---------|
86+
| ---- | ------- |
8787
| aws | >= 4.9 |
8888

8989
## Modules ##
@@ -93,17 +93,25 @@ No modules.
9393
## Resources ##
9494

9595
| Name | Type |
96+
<<<<<<< HEAD
9697
|------|------|
9798
| [aws_iam_policy.ssm_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
9899
| [aws_iam_role.ssm_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
99100
| [aws_iam_role_policy_attachment.ssm_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
100101
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
101102
| [aws_iam_policy_document.assume_role_doc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
102103
| [aws_iam_policy_document.ssm_doc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
104+
=======
105+
| ---- | ---- |
106+
| [aws_instance.example](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource |
107+
| [aws_ami.example](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
108+
| [aws_default_tags.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/default_tags) | data source |
109+
>>>>>>> a56d4c99f2984eba574de97a36018d4a612181cf
103110
104111
## Inputs ##
105112

106113
| Name | Description | Type | Default | Required |
114+
<<<<<<< HEAD
107115
|------|-------------|------|---------|:--------:|
108116
| account\_ids | AWS account IDs that are allowed to assume the role. | `list(string)` | `[]` | no |
109117
| entity\_name | The name of the entity that the role is being created for (e.g. "test-user" or "host.example.com"). | `string` | n/a | yes |
@@ -112,13 +120,29 @@ No modules.
112120
| role\_name | The name to assign the IAM role (as well as the corresponding policy) that allows read-only access to the specified SSM Parameter Store parameters. Note that the "%s" in this value will get replaced with the entity\_name variable. If there are no instances of "%s" present in this value, no replacement will be made and the value will be used as is. Including more than one instance of "%s" in this value will result in a Terraform error, so don't do that. If the role name is longer than the current AWS limit of 64 characters (either as-is or after entity\_name replacement), the role name will be truncated to the first 64 characters. | `string` | `"ParameterStoreReadOnly-%s"` | no |
113121
| ssm\_names | A list of SSM Parameter Store parameters that the created role will be allowed to access. | `list(string)` | n/a | yes |
114122
| ssm\_regions | AWS regions of target SSMs (e.g. ["us-east-1", "us-east-2"]). If not provided, defaults to all regions. | `list(string)` | ```[ "*" ]``` | no |
123+
=======
124+
| ---- | ----------- | ---- | ------- | :------: |
125+
| ami\_owner\_account\_id | The ID of the AWS account that owns the Example AMI, or "self" if the AMI is owned by the same account as the provisioner. | `string` | `"self"` | no |
126+
| aws\_availability\_zone | The AWS availability zone to deploy into (e.g. a, b, c, etc.). | `string` | `"a"` | no |
127+
| aws\_region | The AWS region to deploy into (e.g. us-east-1). | `string` | `"us-east-1"` | no |
128+
| subnet\_id | The ID of the AWS subnet to deploy into (e.g. subnet-0123456789abcdef0). | `string` | n/a | yes |
129+
>>>>>>> a56d4c99f2984eba574de97a36018d4a612181cf
115130
116131
## Outputs ##
117132

118133
| Name | Description |
134+
<<<<<<< HEAD
119135
|------|-------------|
120136
| policy | The IAM policy that can read the specified SSM Parameter Store parameters. |
121137
| role | The IAM role that can read the specified SSM Parameter Store parameters. |
138+
=======
139+
| ---- | ----------- |
140+
| arn | The EC2 instance ARN. |
141+
| availability\_zone | The AZ where the EC2 instance is deployed. |
142+
| id | The EC2 instance ID. |
143+
| private\_ip | The private IP of the EC2 instance. |
144+
| subnet\_id | The ID of the subnet where the EC2 instance is deployed. |
145+
>>>>>>> a56d4c99f2984eba574de97a36018d4a612181cf
122146
<!-- END_TF_DOCS -->
123147
124148
## Notes ##

examples/basic_usage/.terraform.lock.hcl

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

examples/basic_usage/README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,24 @@ Note that this example may create resources which cost money. Run
1212
## Requirements ##
1313

1414
| Name | Version |
15-
|------|---------|
15+
| ---- | ------- |
1616
| terraform | ~> 1.1 |
1717
| aws | ~> 6.7 |
1818

1919
## Providers ##
2020

21+
<<<<<<< HEAD
2122
No providers.
23+
=======
24+
| Name | Version |
25+
| ---- | ------- |
26+
| aws | ~> 6.7 |
27+
>>>>>>> a56d4c99f2984eba574de97a36018d4a612181cf
2228
2329
## Modules ##
2430

2531
| Name | Source | Version |
32+
<<<<<<< HEAD
2633
|------|--------|---------|
2734
| ssm\_role | ../../ | n/a |
2835

@@ -33,11 +40,41 @@ No resources.
3340
## Inputs ##
3441

3542
No inputs.
43+
=======
44+
| ---- | ------ | ------- |
45+
| example | ../../ | n/a |
46+
47+
## Resources ##
48+
49+
| Name | Type |
50+
| ---- | ---- |
51+
| [aws_subnet.example](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |
52+
| [aws_vpc.example](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc) | resource |
53+
54+
## Inputs ##
55+
56+
| Name | Description | Type | Default | Required |
57+
| ---- | ----------- | ---- | ------- | :------: |
58+
| ami\_owner\_account\_id | The ID of the AWS account that owns the AMI, or "self" if the AMI is owned by the same account as the provisioner. | `string` | `"self"` | no |
59+
| aws\_availability\_zone | The AWS availability zone to deploy into (e.g. a, b, c, etc.). | `string` | `"a"` | no |
60+
| aws\_region | The AWS region to deploy into (e.g. us-east-1). | `string` | `"us-east-1"` | no |
61+
| tags | Tags to apply to all AWS resources created. | `map(string)` | ```{ "Testing": true }``` | no |
62+
| tf\_role\_arn | The ARN of the role that can terraform non-specialized resources. | `string` | n/a | yes |
63+
>>>>>>> a56d4c99f2984eba574de97a36018d4a612181cf
3664
3765
## Outputs ##
3866

3967
| Name | Description |
68+
<<<<<<< HEAD
4069
|------|-------------|
4170
| policy | The IAM policy that can read the specified SSM Parameter Store parameters for site.example.com. |
4271
| role | The IAM role that can read the specified SSM Parameter Store parameters for site.example.com. |
72+
=======
73+
| ---- | ----------- |
74+
| arn | The EC2 instance ARN. |
75+
| availability\_zone | The AZ where the EC2 instance is deployed. |
76+
| id | The EC2 instance ID. |
77+
| private\_ip | The private IP of the EC2 instance. |
78+
| subnet\_id | The ID of the subnet where the EC2 instance is deployed. |
79+
>>>>>>> a56d4c99f2984eba574de97a36018d4a612181cf
4380
<!-- END_TF_DOCS -->

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
setuptools
2-
wheel
1+
setuptools>=70.1

0 commit comments

Comments
 (0)