generated from cloudposse/terraform-example-module
-
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.
Merge pull request #4 from masterpointio/feature/use-sops-type
feat: use sops secret mapping type by default
- Loading branch information
Showing
8 changed files
with
94 additions
and
19 deletions.
There are no files selected for viewing
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,18 @@ | ||
name: Release Please | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f #v4.1.3 | ||
with: | ||
release-type: terraform-module |
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,34 @@ | ||
name: Trunk Upgrade | ||
|
||
on: | ||
schedule: | ||
# On the first day of every month @ 8am | ||
- cron: 0 8 1 * * | ||
workflow_dispatch: {} | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
trunk-upgrade: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# For trunk to create PRs | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | ||
|
||
- name: Create Token for MasterpointBot App | ||
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.MP_BOT_APP_ID }} | ||
private_key: ${{ secrets.MP_BOT_APP_PRIVATE_KEY }} | ||
|
||
- name: Upgrade | ||
uses: trunk-io/trunk-action/upgrade@86b68ffae610a05105e90b1f52ad8c549ef482c2 #v1.1.16 | ||
with: | ||
github-token: ${{ steps.generate-token.outputs.token }} | ||
reviewers: "@masterpointio/masterpoint-internal" | ||
prefix: "chore: " |
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
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,24 @@ | ||
module "secrets" { | ||
source = "../../" | ||
secret_mapping = var.secret_mapping | ||
} | ||
|
||
variable "secret_mapping" { | ||
type = list(object({ | ||
name = string | ||
type = optional(string, "sops") | ||
path = optional(string, null) | ||
file = string | ||
})) | ||
default = [] | ||
description = <<-EOT | ||
The list of secret mappings the application will need. | ||
This creates secret values for the component to consume at `local.secrets[name]`. | ||
EOT | ||
} | ||
|
||
# Reference your secrets using the module output | ||
locals { | ||
# tflint-ignore: terraform_unused_declarations | ||
secrets = module.secrets.all | ||
} |
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,5 +1,4 @@ | ||
secret_mapping = [{ | ||
name = "db_password" | ||
file = "test.yaml" | ||
type = "sops" | ||
}] |
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