Skip to content

Commit c54c2b8

Browse files
committed
Update templates
1 parent cd3769c commit c54c2b8

File tree

12 files changed

+61
-30
lines changed

12 files changed

+61
-30
lines changed

.github/dependabot.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
##############################
3+
## Dependabot configuration ##
4+
##############################
5+
6+
#
7+
# Documentation:
8+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates
9+
#
10+
11+
version: 2
12+
updates:
13+
# Maintain dependencies for GitHub Actions
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "daily"
18+
open-pull-requests-limit: 0
19+
20+
# Maintain dependencies for Terraform Providers
21+
- package-ecosystem: "terraform"
22+
directory: "/"
23+
schedule:
24+
interval: "daily"
25+
open-pull-requests-limit: 0
26+
27+
# Maintain dependencies for Golang
28+
- package-ecosystem: "gomod"
29+
directory: "/"
30+
schedule:
31+
interval: "daily"
32+
open-pull-requests-limit: 0

.github/pull_request-template.md

-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
...
77

8-
## How this PR fixes it
9-
10-
...
11-
128
## Readiness Checklist
139

1410
### Author/Contributor

.pre-commit-config.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.76.0
3+
rev: v1.80.0
44
hooks:
55
- id: terraform_docs
66
- id: terraform_fmt
77
- id: terraform_validate
8+
args:
9+
- --hook-config=--retry-once-with-cleanup=true
810
exclude: '^[^/]+$'
911
- id: terraform_tflint
1012
exclude: ^examples/
1113

1214
- repo: https://github.com/pre-commit/pre-commit-hooks
13-
rev: v4.3.0
15+
rev: v4.4.0
1416
hooks:
1517
- id: trailing-whitespace
1618
- id: end-of-file-fixer

modules/db_event_subscription/main.tf

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ resource "aws_db_event_subscription" "main" {
1313
}
1414

1515
module "notification" {
16-
source = "github.com/geekcell/terraform-aws-sns-email-notification?ref=v1"
16+
source = "geekcell/sns-email-notification/aws"
17+
version = ">= 1.0.0, < 2.0.0"
1718

1819
name = var.name
1920
email_addresses = var.recipients
21+
22+
tags = var.tags
2023
}

modules/db_proxy/main.tf

+1-6
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,7 @@ module "db_proxy_secret" {
7272
source = "../db_proxy_secret"
7373

7474
# Name
75-
name = format(
76-
"rds/proxy/%s/cluster/%s/user/%s/credentials",
77-
var.name,
78-
var.rds_cluster_identifier,
79-
each.key
80-
)
75+
name = "rds/proxy/${var.name}/cluster/${var.rds_cluster_identifier}/user/${each.key}/credentials"
8176
description = "AWS RDS Proxy User Credentials."
8277
username = each.key
8378

modules/db_proxy_secret/main.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ resource "aws_secretsmanager_secret_version" "main" {
2727
}
2828

2929
module "kms" {
30-
source = "github.com/geekcell/terraform-aws-kms?ref=v1"
30+
source = "geekcell/kms/aws"
31+
version = ">= 1.0.0, < 2.0.0"
3132

3233
alias = var.name
33-
34-
tags = var.tags
34+
tags = var.tags
3535
}

modules/rds_cluster/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
## Resources
5858

5959
- resource.aws_rds_cluster.main (modules/rds_cluster/main.tf#1)
60-
- resource.random_password.master_password (modules/rds_cluster/main.tf#105)
61-
- resource.random_string.master_username (modules/rds_cluster/main.tf#99)
60+
- resource.random_password.master_password (modules/rds_cluster/main.tf#107)
61+
- resource.random_string.master_username (modules/rds_cluster/main.tf#101)
6262
- data source.aws_availability_zones.available (modules/rds_cluster/data.tf#1)
6363
<!-- END_TF_DOCS -->

modules/rds_cluster/main.tf

+6-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resource "aws_rds_cluster" "main" {
1212
# Storage
1313
allocated_storage = var.allocated_storage
1414
iops = var.iops
15-
kms_key_id = module.kms["storage"].key_arn
15+
kms_key_id = module.kms.key_arn
1616
storage_encrypted = var.storage_encrypted
1717
storage_type = var.storage_type
1818

@@ -91,9 +91,11 @@ module "autoscaling" {
9191
}
9292

9393
module "kms" {
94-
for_each = toset(["storage"])
95-
source = "github.com/geekcell/terraform-aws-kms?ref=v1"
96-
alias = format("/rds/cluster/%s/%s", var.cluster_identifier, each.key)
94+
source = "geekcell/kms/aws"
95+
version = ">= 1.0.0, < 2.0.0"
96+
97+
alias = "/rds/cluster/${var.cluster_identifier}/storage"
98+
tags = var.tags
9799
}
98100

99101
resource "random_string" "master_username" {

modules/rds_cluster/variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ variable "replication_source_identifier" {
159159

160160
variable "serverlessv2_scaling_configuration" {
161161
description = "The scaling configuration of the Aurora Serverless DB cluster."
162-
type = object({
162+
type = object({
163163
max_capacity = optional(number)
164164
min_capacity = optional(number)
165165
})

modules/rds_cluster_instance/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838
## Resources
3939

4040
- resource.aws_rds_cluster_instance.main (modules/rds_cluster_instance/main.tf#1)
41-
- resource.random_password.master_password (modules/rds_cluster_instance/main.tf#63)
42-
- resource.random_string.master_username (modules/rds_cluster_instance/main.tf#58)
41+
- resource.random_password.master_password (modules/rds_cluster_instance/main.tf#64)
42+
- resource.random_string.master_username (modules/rds_cluster_instance/main.tf#59)
4343
<!-- END_TF_DOCS -->

modules/rds_cluster_instance/main.tf

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "aws_rds_cluster_instance" "main" {
1919

2020
# Performance Insights
2121
performance_insights_enabled = var.performance_insights_enabled
22-
performance_insights_kms_key_id = module.kms["performance_insights"].key_arn
22+
performance_insights_kms_key_id = module.kms.key_arn
2323
performance_insights_retention_period = var.performance_insights_retention_period
2424

2525
# Network
@@ -49,10 +49,11 @@ module "db_enhanced_monitoring" {
4949
}
5050

5151
module "kms" {
52-
for_each = toset(["performance_insights"])
52+
source = "geekcell/kms/aws"
53+
version = ">= 1.0.0, < 2.0.0"
5354

54-
source = "github.com/geekcell/terraform-aws-kms?ref=v1"
55-
alias = format("alias/rds/cluster/%s/instance/%s/%s", var.identifier, var.identifier, each.key)
55+
alias = "alias/rds/cluster/${var.identifier}/instance/${var.identifier}/performance-insights"
56+
tags = var.tags
5657
}
5758

5859
resource "random_string" "master_username" {

variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ variable "serverlessv2_scaling_configuration" {
205205
min_capacity = null
206206
}
207207
description = "The scaling configuration of the Aurora Serverless DB cluster."
208-
type = object({
208+
type = object({
209209
max_capacity = number
210210
min_capacity = number
211211
})

0 commit comments

Comments
 (0)