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
locals { | |
member_entity_ids = var.entity_ids | |
} | |
data "vault_policy_document" "default" { | |
rule { | |
path = "sys/namespaces/" | |
capabilities = ["list"] | |
description = "List namespaces in root" | |
} |
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
resource "aws_iam_access_key" "default" { | |
user = var.user | |
} | |
resource "vault_auth_backend" "default" { | |
type = "aws" | |
} | |
resource "vault_aws_auth_backend_client" "default" { | |
backend = vault_auth_backend.default.path |
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
locals { | |
oidc_app = "hashicorp-vault-app" | |
} | |
data "auth0_tenant" "default" {} | |
resource "auth0_connection" "default" { | |
name = local.oidc_app | |
strategy = "auth0" | |
} |
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
locals { | |
role_name = "failover-handler" | |
} | |
data "vault_policy_document" "default" { | |
rule { | |
path = "sys/replication/dr/secondary/promote" | |
capabilities = ["update"] | |
description = "Create and manage ACL policies" | |
} |
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
variable "approle_id" {} | |
variable "approle_secret" {} | |
provider "vault" { | |
auth_login { | |
namespace = "admin/terraform-vault-secrets-gcp" | |
path = "auth/approle/login" | |
parameters = { | |
role_id = var.approle_id |
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
/** | |
* Usage: | |
* | |
* ```hcl | |
* | |
* module "github_repo" { | |
* source = "hashicorp/github_terraform_module" | |
* application_name = "foo" | |
* tfc_token = vault_terraform_cloud_secret_creds.default.token | |
* } |
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
locals { | |
engine = [ | |
"secret", | |
"oracle", | |
"postgres", | |
"mysql" | |
] | |
} | |
data "vault_policy_document" "read" { |
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
data "aws_iam_policy_document" "default" { | |
version = "2012-10-17" | |
statement { | |
sid = "FederatedTrustVaultOIDC" | |
effect = "Allow" | |
actions = ["sts:AssumeRoleWithWebIdentity", ] | |
principals { | |
type = "Federated" |
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
data "okta_group" "default" { | |
name = var.group_name | |
} | |
resource "vault_identity_group" "default" { | |
name = data.okta_group.default.name | |
type = "external" | |
external_policies = true | |
} |
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
data "aws_billing_service_account" "default" {} | |
resource "aws_iam_user" "default" { | |
name = "vault-aws-auth-user" | |
} | |
resource "aws_iam_access_key" "default" { | |
user = aws_iam_user.default.name | |
} |