Skip to content

Commit 1b69017

Browse files
feat: Add KMS key ID output and enhance log group tests
- Added new github workflows. - Added output for KMS key ID in outputs.tf. - Updated TestLogGroup in test_impl.go to include KMS key ID validation. - Implemented retry logic for DescribeLogGroups to handle eventual consistency. - Modified GetAWSConfig to accept region as a parameter and extract it from ARN. - Updated required Terraform version in versions.tf to allow for minor updates.
1 parent f9836ad commit 1b69017

26 files changed

+804
-1155
lines changed

.github/copilot-instructions.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# GitHub Copilot Instructions
2+
3+
## File Editing Rules
4+
5+
- **NEVER remove license headers** from files when making edits.
6+
- Always preserve the Apache 2.0 license header at the top of all source files (`.tf`, `.go`, `.sh`, etc.).
7+
- When editing files, include the full license header in replacements if modifying code near the top of files.
8+
9+
## Terminal Command Rules
10+
11+
- **DO NOT use timeout flags** with terminal commands (e.g., avoid `-timeout` with go test)
12+
- Let commands run to completion naturally. Do not use `less`, `more`, `head`, `tail` or similar pagers to truncate output as these will interrupt the execution of the command and potentially lead to corruption of the terraform state files.
13+
- If a command needs to be stopped, the user will cancel it manually.
14+
- For long-running tests, rely on the default behavior rather than imposing artificial time limits.
15+
16+
## Terraform Best Practices
17+
18+
- Follow the module structure defined in the repository.
19+
- Maintain consistency with existing patterns.
20+
- Use dynamic blocks appropriately for optional nested configurations.
21+
- Always validate configurations with `terraform validate` before planning or applying.
22+
23+
## Testing Guidelines
24+
25+
- Write comprehensive tests that verify actual AWS resource creation.
26+
- Use the AWS SDK to verify resource properties match Terraform outputs.
27+
- Test both required and optional parameters.
28+
- Include validation for resource naming, encryption, and other critical settings.
29+
30+
## Documentation Standards
31+
32+
- Focus on "why" and not "how" in documentation.
33+
- Ensure clarity and conciseness in documentation.
34+
- Use examples to illustrate complex concepts.
35+
- Keep documentation up to date with code changes.
36+
- Track changes in a CHANGELOG.md file instead of individual change documentation files.
37+
38+
## Terraform Primitive Module Development
39+
40+
- Primitive modules should be designed for reuse across multiple projects.
41+
- Primitive modules should not contain any configuration or opinionated settings.
42+
- Primitive modules should only wrap a single resource type. The only exception is when a resource requires a data source to function properly.
43+
- The terraform code should exist in the root of the repository.
44+
- The agent will modify the test files found in `/tests/testimpl/test_impl.go` to add test coverage for the primitive module.
45+
- The agent should not modify any files outside of the root directory, the example implementations found in `/examples/`, and `/tests/testimpl/test_impl.go`.

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "gomod"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
- package-ecosystem: "terraform"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"

.github/release-drafter.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name-template: "$RESOLVED_VERSION"
3+
tag-template: "$RESOLVED_VERSION"
4+
template: |
5+
# Changelog
6+
7+
$CHANGES
8+
9+
---
10+
11+
See details of [all code changes](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION) since previous release.
12+
13+
categories:
14+
- title: ":warning: Breaking Changes"
15+
labels:
16+
- "major"
17+
- title: "🚀 Features"
18+
labels:
19+
- "minor"
20+
- title: "🔧 Fixes"
21+
collapse-after: 3
22+
labels:
23+
- "patch"
24+
25+
autolabeler:
26+
- label: "major"
27+
branch:
28+
- '/(patch|bug|fix|feature|chore)!\/.+/'
29+
- label: "minor"
30+
branch:
31+
- '/feature\/.+/'
32+
- label: "patch"
33+
branch:
34+
- '/(patch|bug|fix|chore)\/.+/'
35+
36+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
37+
38+
version-resolver:
39+
major:
40+
labels:
41+
- "major"
42+
minor:
43+
labels:
44+
- "minor"
45+
patch:
46+
labels:
47+
- "patch"
48+
- "dependencies"
49+
default: patch

.github/workflows/increment-tagged-version.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/lint-terraform.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Label Pull Request
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
check:
9+
name: "Label Pull Request"
10+
permissions:
11+
contents: read
12+
issues: write
13+
pull-requests: write
14+
uses: launchbynttdata/launch-workflows/.github/workflows/[email protected]
15+
secrets: inherit # pragma: allowlist secret
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Check AWS Terraform Code
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize, ready_for_review]
6+
branches: [main]
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
check:
14+
name: "Check AWS Terraform Code"
15+
permissions:
16+
contents: read
17+
id-token: write
18+
uses: launchbynttdata/launch-workflows/.github/workflows/[email protected]
19+
with:
20+
assume_role_arn: ${{ vars.TERRAFORM_CHECK_AWS_ASSUME_ROLE_ARN }}
21+
region: ${{ vars.TERRAFORM_CHECK_AWS_REGION }}
22+
secrets: inherit # pragma: allowlist secret
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release-on-merge:
13+
name: "Create and Publish Release on Merge"
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
uses: launchbynttdata/launch-workflows/.github/workflows/[email protected]
18+
secrets: inherit # pragma: allowlist secret

.github/workflows/validate-branch-name.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ terraform.*
22
.repo/
33
components/
44
.semverbot.toml
5-
.tflint.hcl
6-
.golangci.yaml
5+
76

87
.idea
98
!examples/*.tfvars
@@ -56,10 +55,10 @@ terraform.rc
5655
# Files from common modules
5756
azure_env.sh
5857
.releaserc.json
59-
.tflint.hcl
6058

6159
# Pre-commit hook
6260
.pre-commit-config.yaml
6361

6462
# VS Code
6563
.vscode/
64+
.envrc

0 commit comments

Comments
 (0)