Skip to content

Commit

Permalink
Merge branch 'pre-commit-ci-update-config' of https://github.com/bruc…
Browse files Browse the repository at this point in the history
…ellino/terraform-digitalocean-consul into pre-commit-ci-update-config
  • Loading branch information
brucellino committed Mar 17, 2024
2 parents 2538eff + 28db55f commit c8edb2d
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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']
Expand Down
55 changes: 55 additions & 0 deletions examples/vault-agent/main.tf
Original file line number Diff line number Diff line change
@@ -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 = []
}

0 comments on commit c8edb2d

Please sign in to comment.