Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/commitmsg-conform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Commit Message Conformance

on:
pull_request: {}

permissions:
statuses: write
checks: write
contents: read
pull-requests: read

jobs:
commitmsg-conform:
uses: actionsforge/actions/.github/workflows/commitmsg-conform.yml@main
14 changes: 14 additions & 0 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Markdown Lint

on:
pull_request: {}

permissions:
statuses: write
checks: write
contents: read
pull-requests: read

jobs:
markdown-lint:
uses: actionsforge/actions/.github/workflows/markdown-lint.yml@main
13 changes: 13 additions & 0 deletions .github/workflows/terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Generate terraform docs

on:
push:
branches:
- main

permissions:
contents: write

jobs:
terraform-docs:
uses: actionsforge/actions/.github/workflows/terraform-docs.yml@main
13 changes: 13 additions & 0 deletions .github/workflows/terraform-lint-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Terraform Lint & Validate

on:
pull_request: {}
permissions:
statuses: write
checks: write
contents: read
pull-requests: read

jobs:
terraform-lint-validate:
uses: actionsforge/actions/.github/workflows/terraform-lint-validate.yml@main
12 changes: 12 additions & 0 deletions .github/workflows/terraform-tag-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Terraform Tag and Release
on:
workflow_run:
workflows: ["Generate terraform docs"]
types:
- completed

permissions:
contents: write
jobs:
terraform-tag-and-release:
uses: actionsforge/actions/.github/workflows/terraform-tag-and-release.yml@main
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Local .terraform directories
**/.terraform/

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Ignore transient lock info files created by terraform apply
.terraform.tfstate.lock.info

# Include override files you do wish to add to version control using negated pattern
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Ignore CLI configuration files
.terraformrc
terraform.rc
45 changes: 45 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"recommendations": [
"davidanson.vscode-markdownlint",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"Gruntfuggly.todo-tree",
"hashicorp.terraform",
"mhutchie.git-graph",
"streetsidesoftware.code-spell-checker",
"usernamehw.errorlens",
"vscode-icons-team.vscode-icons"
]
}
52 changes: 52 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"files.associations": {
"*.dockerfile": "dockerfile",
"*.sh.tpl": "shellscript",
"docker-compose*.yml": "yaml",
"Dockerfile*": "dockerfile"
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"__debug_bin": true,
"vendor/": true,
"go.sum": true
},
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"files.insertFinalNewline": true,
"remote.extensionKind": {
"ms-azuretools.vscode-docker": "ui",
"ms-vscode-remote.remote-containers": "ui"
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"prettier.requireConfig": true,
"workbench.iconTheme": "vscode-icons",
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features",
"editor.foldingStrategy": "indentation"
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"[terraform]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "hashicorp.terraform",
"editor.tabSize": 2,
"editor.insertSpaces": true
}
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# terraform-aws-aurora-postgresql

Terraform module for deploying Aurora PostgreSQL cluster

<!-- BEGIN_TF_DOCS -->
<!-- END_TF_DOCS -->
45 changes: 45 additions & 0 deletions examples/standard/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions examples/standard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Aurora PostgreSQL Example

This example demonstrates a complete Aurora PostgreSQL setup using the custom module with VPC infrastructure.

## Features

- Creates a new VPC with public/private subnets in ap-southeast-2
- Deploys Aurora PostgreSQL 15 cluster with 2 instances (Multi-AZ)
- Enables storage encryption with KMS
- Sets up enhanced monitoring and Performance Insights
- Creates custom parameter groups with SSL enforcement
- Uses private subnets with NAT Gateway for internet access

## Usage

```bash
cd examples/standard
terraform init
terraform plan
terraform apply
```

## Configuration

The example creates:

- **VPC**: 10.0.0.0/16 with 3 AZs
- **Aurora**: 2x db.r6g.large instances
- **Security**: Encrypted storage, monitoring, CloudWatch logs
- **Networking**: Private subnets, security groups, NAT Gateway

## Requirements

- Terraform >= 1.0
- AWS provider configured
- Access to ap-southeast-2 region

## Notes

- This is a test/demo configuration
- Uses db.r6g.large instances (~$250/month)
- Consider db.t3.medium for cost savings (~$100/month)
- Multi-AZ setup for learning purposes

## Cleanup

```bash
terraform destroy
rm -rf .terraform .terraform.lock.hcl terraform.tfstate*
```
Loading