This file contains hidden or 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
| terraform_plan: | |
| stage: plan | |
| image: hashicorp/terraform:1.15 | |
| variables: | |
| TF_TOKEN_app_terraform_io: $TF_CLOUD_TOKEN # Set this in GitLab CI/CD Variables | |
| before_script: | |
| - terraform --version | |
| - terraform init |
This file contains hidden or 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
| [Unit] | |
| Description="HashiCorp Consul - A service mesh solution" | |
| Documentation=https://www.consul.io/ | |
| Requires=network-online.target | |
| After=network-online.target | |
| ConditionFileNotEmpty=/etc/consul.d/consul.hcl | |
| [Service] | |
| Type=notify | |
| EnvironmentFile=-/etc/consul.d/consul.env |
This file contains hidden or 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
| module "aws_us_west_2" { | |
| source = "hashicorp/consul-enterprise-hvd/aws" | |
| # Instance Configuration | |
| ami_id = data.aws_ami.ubuntu_numbat_24_04.id | |
| instance_type = var.instance_type | |
| key_name = "marsey-aws-vault" | |
| vpc_id = "vpc-0b2ff27ad89ab605d" | |
| instance_subnets = data.aws_subnets.us_west_2_private.ids |
This file contains hidden or 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
| #!/bin/bash | |
| set -eu | |
| VAULT_VERSION="1.11.4+ent-1" | |
| VAULT_BINARY_LOCATION=/home/user123/vault | |
| VAULT_LICENSE_KEY="lskdjaflwekajlr3lwkrj23lja<UPDATE>" | |
| USER="vault" | |
| GROUP="vault" | |
| #ALL CERTIFICATES SHOULD BE BASE64 |
This file contains hidden or 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
| # Read system health check | |
| path "sys/health" { | |
| capabilities = ["read", "sudo"] | |
| } | |
| # Read license | |
| path "sys/license" { | |
| capabilities = ["read"] | |
| } |
This file contains hidden or 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
| module "hcp-vault" { | |
| source = "./hcp-vault" | |
| cloud_provider = "aws" | |
| tier = "plus_medium" | |
| primary_cluster_hvn = "hvn-us-west-2" | |
| primary_region = "us-west-2" | |
| primary_cluster_hvn_cidr = var.primary_hvn_cidr | |
| primary_cluster_id = "vault-us-west-2" |
This file contains hidden or 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
| terraform { | |
| required_providers { | |
| vault = ">=3.14.0" | |
| } | |
| } | |
| provider "vault" {} | |
| resource "vault_namespace" "dev" { | |
| path = "dev" |
This file contains hidden or 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
| module "primary_us_vpc" { | |
| source = "terraform-aws-modules/vpc/aws" | |
| version = "4.0.1" | |
| providers = { | |
| aws = aws.us-east-1 | |
| } | |
| name = "vault-us-east-1" | |
| cidr = "10.64.0.0/22" |
This file contains hidden or 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
| module "vault_west" { | |
| source = "../" | |
| vpc_cidr = "172.31.1.0/24" | |
| vpc_name = "vault-west" | |
| providers = { | |
| aws = aws.us-west-2 | |
| } | |
| } |
This file contains hidden or 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
| # Manage auth methods broadly across Vault | |
| path "auth/*" | |
| { | |
| capabilities = ["create", "read", "update", "delete", "list", "sudo"] | |
| } | |
| # Create, update, and delete auth methods | |
| path "sys/auth/*" | |
| { | |
| capabilities = ["create", "update", "delete", "sudo"] |
NewerOlder