diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7373448..d85091b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: with: fetch-depth: 0 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 'lts/*' - name: Install dependencies diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 91a0eb7..c375d7e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -14,22 +14,22 @@ repos: - id: detect-secrets args: ["--baseline", ".secrets.baseline"] - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.83.3 + rev: v1.88.1 hooks: - id: terraform_fmt - id: terraform_validate - id: terraform_tfsec - repo: https://github.com/terraform-docs/terraform-docs - rev: v0.16.0 + rev: v0.17.0 hooks: - id: terraform-docs-go args: ["markdown", "--output-file", "README.md", "."] - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.26.3 + rev: 0.28.0 hooks: - id: check-github-actions - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: v9.5.0 + rev: v9.13.0 hooks: - id: commitlint additional_dependencies: ['@commitlint/config-conventional'] diff --git a/examples/vault-agent/main.tf b/examples/vault-agent/main.tf new file mode 100644 index 0000000..771b0d4 --- /dev/null +++ b/examples/vault-agent/main.tf @@ -0,0 +1,55 @@ +terraform { + required_providers { + vault = { + source = "hashicorp/vault" + version = "~> 3" + } + digitalocean = { + source = "digitalocean/digitalocean" + version = "~> 2" + } + } + backend "consul" { + path = "terraform/modules/tfmod-digitalocean-vpc/vault-agent" + } +} + +provider "vault" { + # Configuration options +} + +data "vault_generic_secret" "do" { + path = "digitalocean/tokens" +} + +provider "digitalocean" { + token = data.vault_generic_secret.do.data["terraform"] +} + +variable "consul_version" { + type = string + default = "1.16.3" +} + +module "vpc" { + source = "brucellino/vpc/digitalocean" + version = "1.0.3" + vpc_name = "consultest-${var.consul_version}" + project = { + description = "Consul v${var.consul_version} Test Project" + environment = "development" + name = "consulTest_v${var.consul_version}" + purpose = "Personal" + } +} + +module "consul" { + depends_on = [module.vpc] + source = "../../" + servers = 1 + agents = 1 + vpc_name = "consultest-${var.consul_version}" + project_name = "consulTest_v${var.consul_version}" + consul_version = var.consul_version + ssh_inbound_source_cidrs = [] +}