-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLT-0 - Move module from sharded to extra repo
* setup module
- Loading branch information
Showing
9 changed files
with
134 additions
and
22 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @Flaconi/devops | ||
* @Flaconi/devops @Flaconi/ci @Flaconi/platform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
name: Dependabot auto-merge | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
auto-merge: | ||
uses: Flaconi/github-actions/.github/workflows/auto-merge.yml@v1 | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
--- | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update_release_draft: | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v6 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
uses: Flaconi/github-actions/.github/workflows/release-drafter.yml@v1 | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
moved { | ||
from = aws_ssm_parameter.this | ||
to = module.ssm.aws_ssm_parameter.this | ||
} | ||
|
||
module "ssm" { | ||
source = "github.com/Flaconi/terraform-aws-ssm-store?ref=v1.2.0" | ||
|
||
tags = var.tags | ||
kms_alias = var.kms_alias | ||
name_prefix = var.name_prefix | ||
parameters = var.parameters | ||
} | ||
|
||
module "secrets" { | ||
source = "github.com/terraform-aws-modules/terraform-aws-secrets-manager?ref=v1.1.2" | ||
|
||
tags = var.tags | ||
|
||
kms_key_id = "alias/aws/secretsmanager" | ||
|
||
name = trimsuffix(var.name_prefix, "/") | ||
description = "Secrets for the ${var.tags.Project} application" | ||
|
||
secret_string = jsonencode({ for parameter in var.parameters : parameter.name => parameter.value }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "parameter_arns" { | ||
description = "Map of parameter name and arn" | ||
value = module.ssm.parameter_arns | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
variable "tags" { | ||
description = "Tags applied to the resources" | ||
type = map(string) | ||
default = {} | ||
} | ||
|
||
variable "kms_alias" { | ||
description = "kms_alias sets the kms alias used for SecureString" | ||
type = string | ||
default = "alias/aws/ssm" | ||
} | ||
|
||
variable "name_prefix" { | ||
description = "name_prefix prefixes the given name with a prefix" | ||
type = string | ||
default = "" | ||
} | ||
|
||
variable "parameters" { | ||
description = "A list of dicts with parameter information" | ||
type = list(object({ | ||
name = string | ||
type = optional(string, "SecureString") # String, StringList or SecureString | ||
value = string | ||
})) | ||
default = [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
terraform { | ||
required_version = "~> 1.3" | ||
required_version = ">= 1.5" | ||
|
||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 4.29" | ||
} | ||
} | ||
} |