Skip to content

Commit 7194bba

Browse files
feat: Enhance EFS module with additional outputs and testing framework (#1)
* pre-staged stuff for Jaxom to finish * Update workflow dependencies to version 0.11.0 for pull request labeling, Terraform checks, and release publishing * feat: Enhance EFS module with additional outputs and testing framework - Added new outputs to outputs.tf for EFS file system attributes including availability zone ID, name, and size. - Created a comprehensive test suite using Terratest for the EFS module, including full lifecycle and read-only tests. - Implemented detailed README files for tests, outlining structure, usage, and best practices. - Developed shared test implementation logic in testimpl package, providing reusable functions and AWS SDK integration. - Updated variables.tf to include new configuration options for EFS, such as name, availability zone, lifecycle policies, and protection settings. * chore: Remove unused locals.tf files from examples * feat: Update EFS example configurations and remove obsolete files * feat: Implement resource naming module and update EFS configurations for standardized naming * Fixed Symlinks * feat: Update EFS examples to prioritize variable inputs over generated names and correct tflint.hcl file in root * feat: Enhance EFS module documentation and variable requirements for clarity and consistency * feat: Refactor EFS example configurations for standardized naming and remove obsolete files --------- Co-authored-by: Ben Vaughan <[email protected]>
1 parent 6b67b4b commit 7194bba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5325
-1
lines changed

.github/copilot-instructions.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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
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

.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
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

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
terraform.*
2+
.repo/
3+
components/
4+
.semverbot.toml
5+
vendor/
6+
7+
.idea
8+
!examples/*.tfvars
9+
10+
# We don't want to commit the test run lock files
11+
.terraform.lock.hcl
12+
13+
# Don't include the .test-data directory created by Terratest's test-structure module
14+
**/.test-data/*
15+
16+
# Local .terraform directories
17+
**/.terraform/*
18+
19+
# Local .terragrunt directories
20+
**/.terragrunt/*
21+
22+
# .tfstate files
23+
*.tfstate
24+
*.tfstate.*
25+
*.tfplan
26+
tfplan.*
27+
tfplan
28+
29+
# Crash log files
30+
crash.log
31+
crash.*.log
32+
33+
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
34+
# password, private keys, and other secrets. These should not be part of version
35+
# control as they are data points which are potentially sensitive and subject
36+
# to change depending on the environment.
37+
*.tfvars.json
38+
*.auto.tfvars
39+
40+
# Ignore override files as they are usually used to override resources locally and so
41+
# are not checked in
42+
override.tf
43+
override.tf.json
44+
*_override.tf
45+
*_override.tf.json
46+
provider.tf
47+
48+
# Include override files you do wish to add to version control using negated pattern
49+
# !example_override.tf
50+
51+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
52+
# example: *tfplan*
53+
54+
# Ignore CLI configuration files
55+
.terraformrc
56+
terraform.rc
57+
58+
# Files from common modules
59+
azure_env.sh
60+
.releaserc.json
61+
62+
# VS Code
63+
.vscode/
64+
.devcontainer/
65+
.context/

.golangci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: "2"
2+
run:
3+
# Timeout for analysis, e.g. 30s, 5m.
4+
timeout: 5m
5+
allow-parallel-runners: true

.pre-commit-config.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: check-case-conflict
7+
- id: check-executables-have-shebangs
8+
- id: check-json
9+
- id: check-merge-conflict
10+
- id: check-shebang-scripts-are-executable
11+
- id: check-yaml
12+
args:
13+
- --allow-multiple-documents
14+
- id: end-of-file-fixer
15+
- id: mixed-line-ending
16+
args:
17+
- --fix=auto
18+
- repo: https://github.com/antonbabenko/pre-commit-terraform
19+
rev: v1.99.0
20+
hooks:
21+
- id: terraform_fmt
22+
- id: terraform_validate
23+
- id: terraform_docs
24+
args:
25+
- --hook-config=--path-to-file=README.md
26+
- --hook-config=--add-to-existing-file=true
27+
- --hook-config=--create-file-if-not-exist=true
28+
- --args=--sort=false
29+
- repo: https://github.com/golangci/golangci-lint
30+
rev: v2.2.1
31+
hooks:
32+
- id: golangci-lint
33+
name: golangci-lint
34+
description: Fast linters runner for Go.
35+
entry: golangci-lint run --fix
36+
types: [go]
37+
language: golang
38+
pass_filenames: false
39+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
40+
rev: v9.22.0
41+
hooks:
42+
- id: commitlint
43+
stages: [commit-msg]
44+
additional_dependencies: ["@commitlint/config-conventional"]
45+
- repo: https://github.com/Yelp/detect-secrets
46+
rev: v1.5.0
47+
hooks:
48+
- id: detect-secrets
49+
args: ["--baseline", ".secrets.baseline"]
50+
exclude: package.lock.json

0 commit comments

Comments
 (0)