ce7cb702218693d08ea6d83464d2457c9250027c
This commit is contained in:
commit
34c5f8963c
1 changed files with 145336 additions and 0 deletions
49
terraform/internal/versitygw/providers.tf
Normal file
49
terraform/internal/versitygw/providers.tf
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
terraform {
|
||||
required_version = "< 2.0.0"
|
||||
backend "pg" {
|
||||
conn_str = "postgres://10.234.158.153:5432/tf_state?sslmode=require"
|
||||
schema_name = "internal_versitygw"
|
||||
}
|
||||
|
||||
required_providers {
|
||||
minio = {
|
||||
source = "aminueza/minio"
|
||||
version = "~> 3.30"
|
||||
}
|
||||
versitygw = {
|
||||
source = "quorate/versitygw"
|
||||
version = "0.0.1"
|
||||
}
|
||||
vault = {
|
||||
source = "hashicorp/vault"
|
||||
version = "~> 5.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "vault" {}
|
||||
|
||||
ephemeral "vault_kv_secret_v2" "versitygw_root" {
|
||||
mount = "secret"
|
||||
name = var.root_vault_secret_path
|
||||
}
|
||||
|
||||
locals {
|
||||
root_access_key_id = ephemeral.vault_kv_secret_v2.versitygw_root.data[var.root_access_key_id_key]
|
||||
root_secret_access_key = ephemeral.vault_kv_secret_v2.versitygw_root.data[var.root_secret_access_key_key]
|
||||
}
|
||||
|
||||
provider "versitygw" {
|
||||
endpoint = var.admin_endpoint
|
||||
region = var.region
|
||||
admin_access_key = local.root_access_key_id
|
||||
admin_secret_key = local.root_secret_access_key
|
||||
}
|
||||
|
||||
provider "minio" {
|
||||
minio_server = var.minio_server
|
||||
minio_region = var.region
|
||||
minio_user = local.root_access_key_id
|
||||
minio_password = local.root_secret_access_key
|
||||
minio_ssl = var.minio_ssl
|
||||
}
|
||||
Loading…
Reference in a new issue