Skip to content

Commit 0784ccd

Browse files
czeraszcloudpossebotjoe-niland
authored
support event subscription (cloudposse#30)
* feat: add support for event subscription * refactor: example * Auto Format * refactor: remove obsolete file * refactor: remove .terraform.lock.hcl * Update github workflows --------- Co-authored-by: cloudpossebot <[email protected]> Co-authored-by: Joe Niland <[email protected]>
1 parent 5f0ea85 commit 0784ccd

17 files changed

+213
-30
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
name: Bug report
3+
description: Create a report to help us improve
4+
labels: ["bug"]
5+
assignees: [""]
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Found a bug?
11+
12+
Please checkout our [Slack Community](https://slack.cloudposse.com)
13+
or visit our [Slack Archive](https://archive.sweetops.com/).
14+
15+
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
16+
17+
- type: textarea
18+
id: concise-description
19+
attributes:
20+
label: Describe the Bug
21+
description: A clear and concise description of what the bug is.
22+
placeholder: What is the bug about?
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: expected
28+
attributes:
29+
label: Expected Behavior
30+
description: A clear and concise description of what you expected.
31+
placeholder: What happened?
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: reproduction-steps
37+
attributes:
38+
label: Steps to Reproduce
39+
description: Steps to reproduce the behavior.
40+
placeholder: How do we reproduce it?
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: screenshots
46+
attributes:
47+
label: Screenshots
48+
description: If applicable, add screenshots or logs to help explain.
49+
validations:
50+
required: false
51+
52+
- type: textarea
53+
id: environment
54+
attributes:
55+
label: Environment
56+
description: Anything that will help us triage the bug.
57+
placeholder: |
58+
- OS: [e.g. Linux, OSX, WSL, etc]
59+
- Version [e.g. 10.15]
60+
- Module version
61+
- Terraform version
62+
validations:
63+
required: false
64+
65+
- type: textarea
66+
id: additional
67+
attributes:
68+
label: Additional Context
69+
description: |
70+
Add any other context about the problem here.
71+
validations:
72+
required: false
+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
name: Feature Request
3+
description: Suggest an idea for this project
4+
labels: ["feature request"]
5+
assignees: [""]
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Have a question?
11+
12+
Please checkout our [Slack Community](https://slack.cloudposse.com)
13+
or visit our [Slack Archive](https://archive.sweetops.com/).
14+
15+
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
16+
17+
- type: textarea
18+
id: concise-description
19+
attributes:
20+
label: Describe the Feature
21+
description: A clear and concise description of what the feature is.
22+
placeholder: What is the feature about?
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: expected
28+
attributes:
29+
label: Expected Behavior
30+
description: A clear and concise description of what you expected.
31+
placeholder: What happened?
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: use-case
37+
attributes:
38+
label: Use Case
39+
description: |
40+
Is your feature request related to a problem/challenge you are trying
41+
to solve?
42+
43+
Please provide some additional context of why this feature or
44+
capability will be valuable.
45+
validations:
46+
required: true
47+
48+
- type: textarea
49+
id: ideal-solution
50+
attributes:
51+
label: Describe Ideal Solution
52+
description: A clear and concise description of what you want to happen.
53+
validations:
54+
required: true
55+
56+
- type: textarea
57+
id: alternatives-considered
58+
attributes:
59+
label: Alternatives Considered
60+
description: Explain alternative solutions or features considered.
61+
validations:
62+
required: false
63+
64+
- type: textarea
65+
id: additional
66+
attributes:
67+
label: Additional Context
68+
description: |
69+
Add any other context about the problem here.
70+
validations:
71+
required: false

.github/PULL_REQUEST_TEMPLATE.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
## what
2-
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
3-
* Use bullet points to be concise and to the point.
2+
3+
<!--
4+
- Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
5+
- Use bullet points to be concise and to the point.
6+
-->
47

58
## why
6-
* Provide the justifications for the changes (e.g. business case).
7-
* Describe why these changes were made (e.g. why do these commits fix the problem?)
8-
* Use bullet points to be concise and to the point.
9+
10+
<!--
11+
- Provide the justifications for the changes (e.g. business case).
12+
- Describe why these changes were made (e.g. why do these commits fix the problem?)
13+
- Use bullet points to be concise and to the point.
14+
-->
915

1016
## references
11-
* Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
12-
* Use `closes #123`, if this PR closes a GitHub issue `#123`
1317

18+
<!--
19+
- Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
20+
- Use `closes #123`, if this PR closes a GitHub issue `#123`
21+
-->

.github/auto-release.yml

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ version-resolver:
1717
- 'bugfix'
1818
- 'bug'
1919
- 'hotfix'
20-
- 'no-release'
2120
default: 'minor'
2221

2322
categories:

.github/renovate.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
":preserveSemverRanges"
55
],
66
"labels": ["auto-update"],
7+
"dependencyDashboardAutoclose": true,
78
"enabledManagers": ["terraform"],
89
"terraform": {
910
"ignorePaths": ["**/context.tf", "examples/**"]
1011
}
1112
}
12-

.github/workflows/auto-context.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
make init
2828
make github/init/context.tf
2929
make readme/build
30-
echo "::set-output name=create_pull_request::true"
30+
echo "create_pull_request=true" >> "$GITHUB_OUTPUT"
3131
fi
3232
else
3333
echo "This module has not yet been updated to support the context.tf pattern! Please update in order to support automatic updates."
@@ -37,7 +37,7 @@ jobs:
3737
if: steps.update.outputs.create_pull_request == 'true'
3838
uses: cloudposse/actions/github/[email protected]
3939
with:
40-
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
40+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
4141
committer: 'cloudpossebot <[email protected]>'
4242
author: 'cloudpossebot <[email protected]>'
4343
commit-message: Update context.tf from origin source

.github/workflows/auto-format.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
if: github.event.pull_request.state == 'open'
2020
name: Privileged Checkout
2121
with:
22-
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
22+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
2323
repository: ${{ github.event.pull_request.head.repo.full_name }}
2424
# Check out the PR commit, not the merge commit
2525
# Use `ref` instead of `sha` to enable pushing back to `ref`
@@ -30,7 +30,7 @@ jobs:
3030
if: github.event.pull_request.state == 'open'
3131
shell: bash
3232
env:
33-
GITHUB_TOKEN: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
33+
GITHUB_TOKEN: "${{ secrets.REPO_ACCESS_TOKEN }}"
3434
run: make BUILD_HARNESS_PATH=/build-harness PACKAGES_PREFER_HOST=true -f /build-harness/templates/Makefile.build-harness pr/auto-format/host
3535

3636
# Commit changes (if any) to the PR branch
@@ -54,10 +54,10 @@ jobs:
5454
[[ $SENDER == "cloudpossebot" ]] || git push
5555
# Set status to fail, because the push should trigger another status check,
5656
# and we use success to indicate the checks are finished.
57-
printf "::set-output name=%s::%s\n" "changed" "true"
57+
echo "changed=true" >> "$GITHUB_OUTPUT"
5858
exit 1
5959
else
60-
printf "::set-output name=%s::%s\n" "changed" "false"
60+
echo "changed=false" >> "$GITHUB_OUTPUT"
6161
echo "No changes detected"
6262
fi
6363
@@ -75,7 +75,7 @@ jobs:
7575
contains(' 37929162 29139614 11232728 ', format(' {0} ', github.event.pull_request.user.id))
7676
&& steps.commit.outputs.changed == 'false' && github.event.pull_request.state == 'open'
7777
with:
78-
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
78+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
7979
repository: cloudposse/actions
8080
event-type: test-command
8181
client-payload: |-

.github/workflows/auto-readme.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
3030
run: |
3131
default_branch=$(gh repo view --json defaultBranchRef --jq .defaultBranchRef.name)
32-
printf "::set-output name=defaultBranch::%s\n" "${default_branch}"
32+
echo "defaultBranch=${default_branch}" >> "$GITHUB_OUTPUT"
3333
printf "defaultBranchRef.name=%s\n" "${default_branch}"
3434
3535
- name: Update readme
@@ -52,7 +52,7 @@ jobs:
5252
# If a PR of the auto-update/readme branch is open, this action will just update it, not create a new PR.
5353
uses: cloudposse/actions/github/[email protected]
5454
with:
55-
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
55+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
5656
commit-message: Update README.md and docs
5757
title: Update README.md and docs
5858
body: |-

.github/workflows/auto-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
- uses: actions-ecosystem/action-get-merged-pull-request@v1
1616
id: get-merged-pull-request
1717
with:
18-
github_token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
18+
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
1919
# Drafts your next Release notes as Pull Requests are merged into "main"
2020
- uses: release-drafter/release-drafter@v5
2121
with:
2222
publish: ${{ !contains(steps.get-merged-pull-request.outputs.labels, 'no-release') }}
2323
prerelease: false
2424
config-name: auto-release.yml
2525
env:
26-
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
26+
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}

.github/workflows/chatops.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: "Handle common commands"
1212
uses: cloudposse/actions/github/[email protected]
1313
with:
14-
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
14+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
1515
reaction-token: ${{ secrets.GITHUB_TOKEN }}
1616
repository: cloudposse/actions
1717
commands: rebuild-readme, terraform-fmt
@@ -26,7 +26,7 @@ jobs:
2626
- name: "Run tests"
2727
uses: cloudposse/actions/github/[email protected]
2828
with:
29-
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
29+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
3030
reaction-token: ${{ secrets.GITHUB_TOKEN }}
3131
repository: cloudposse/actions
3232
commands: test

.github/workflows/validate-codeowners.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
steps:
1111
- name: "Checkout source code at current commit"
1212
uses: actions/checkout@v2
13+
# Leave pinned at 0.7.1 until https://github.com/mszostok/codeowners-validator/issues/173 is resolved
1314
- uses: mszostok/[email protected]
1415
if: github.event.pull_request.head.repo.full_name == github.repository
1516
name: "Full check of CODEOWNERS"
@@ -20,7 +21,7 @@ jobs:
2021
checks: "syntax,owners,duppatterns"
2122
owner_checker_allow_unowned_patterns: "false"
2223
# GitHub access token is required only if the `owners` check is enabled
23-
github_access_token: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
24+
github_access_token: "${{ secrets.REPO_ACCESS_TOKEN }}"
2425
- uses: mszostok/[email protected]
2526
if: github.event.pull_request.head.repo.full_name != github.repository
2627
name: "Syntax check of CODEOWNERS"

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,13 @@ Available targets:
138138
| Name | Version |
139139
|------|---------|
140140
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
141-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.0 |
141+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.27 |
142142

143143
## Providers
144144

145145
| Name | Version |
146146
|------|---------|
147-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 2.0 |
147+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.27 |
148148

149149
## Modules
150150

@@ -173,6 +173,7 @@ Available targets:
173173
|------|-------------|------|---------|:--------:|
174174
| <a name="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.<br>This is for some rare cases where resources want additional configuration of tags<br>and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
175175
| <a name="input_assessment_duration"></a> [assessment\_duration](#input\_assessment\_duration) | The max duration of the Inspector assessment run in seconds | `string` | `"3600"` | no |
176+
| <a name="input_assessment_event_subscription"></a> [assessment\_event\_subscription](#input\_assessment\_event\_subscription) | Configures sending notifications about a specified assessment template event to a designated SNS topic | <pre>map(object({<br> event = string<br> topic_arn = string<br> }))</pre> | `{}` | no |
176177
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. | `list(string)` | `[]` | no |
177178
| <a name="input_context"></a> [context](#input\_context) | Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "descriptor_formats": {},<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "labels_as_tags": [<br> "unset"<br> ],<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {},<br> "tenant": null<br>}</pre> | no |
178179
| <a name="input_create_iam_role"></a> [create\_iam\_role](#input\_create\_iam\_role) | Flag to indicate whether an IAM Role should be created to grant the proper permissions for AWS Config | `bool` | `false` | no |
@@ -307,7 +308,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
307308

308309
## Copyrights
309310

310-
Copyright © 2020-2022 [Cloud Posse, LLC](https://cloudposse.com)
311+
Copyright © 2020-2023 [Cloud Posse, LLC](https://cloudposse.com)
311312

312313

313314

@@ -378,7 +379,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
378379

379380
[![README Footer][readme_footer_img]][readme_footer_link]
380381
[![Beacon][beacon]][website]
381-
382+
<!-- markdownlint-disable -->
382383
[logo]: https://cloudposse.com/logo-300x69.svg
383384
[docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-inspector&utm_content=docs
384385
[website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-inspector&utm_content=website
@@ -409,3 +410,4 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
409410
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-inspector
410411
[share_email]: mailto:?subject=terraform-aws-inspector&body=https://github.com/cloudposse/terraform-aws-inspector
411412
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-inspector?pixel&cs=github&cm=readme&an=terraform-aws-inspector
413+
<!-- markdownlint-restore -->

docs/terraform.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
| Name | Version |
55
|------|---------|
66
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
7-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.0 |
7+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.27 |
88

99
## Providers
1010

1111
| Name | Version |
1212
|------|---------|
13-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 2.0 |
13+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.27 |
1414

1515
## Modules
1616

@@ -39,6 +39,7 @@
3939
|------|-------------|------|---------|:--------:|
4040
| <a name="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.<br>This is for some rare cases where resources want additional configuration of tags<br>and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
4141
| <a name="input_assessment_duration"></a> [assessment\_duration](#input\_assessment\_duration) | The max duration of the Inspector assessment run in seconds | `string` | `"3600"` | no |
42+
| <a name="input_assessment_event_subscription"></a> [assessment\_event\_subscription](#input\_assessment\_event\_subscription) | Configures sending notifications about a specified assessment template event to a designated SNS topic | <pre>map(object({<br> event = string<br> topic_arn = string<br> }))</pre> | `{}` | no |
4243
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. | `list(string)` | `[]` | no |
4344
| <a name="input_context"></a> [context](#input\_context) | Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "descriptor_formats": {},<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "labels_as_tags": [<br> "unset"<br> ],<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {},<br> "tenant": null<br>}</pre> | no |
4445
| <a name="input_create_iam_role"></a> [create\_iam\_role](#input\_create\_iam\_role) | Flag to indicate whether an IAM Role should be created to grant the proper permissions for AWS Config | `bool` | `false` | no |

0 commit comments

Comments
 (0)