rickardgranberg / terraform-provider-vaultoperator

Terraform Provider for Vault Operator operations
Mozilla Public License 2.0
19 stars 11 forks source link

initializing vault with self signed certificate #11

Closed ninjadude333 closed 1 year ago

ninjadude333 commented 1 year ago

Hi, when trying to init a vault with a self signed certificate i get the error:

Error: Put "https://vault.xxx.com:8200/v1/sys/init": x509: certificate signed by unknown authority
│
│   with vaultoperator_init.example[0],
│   on main.tf line 191, in resource "vaultoperator_init" "example":
│  191: resource "vaultoperator_init" "example" {

is there any workaround for this issue ?

Terraform Version

Terraform v1.3.5

thanks, david.

rickardgranberg commented 1 year ago

If you're running it in K8s and have the http port available in the cluster, you can use the kube_config block to port forward into the cluster:

provider "vaultoperator" {
  kube_config {
    path       = "~/.kube/config"
    namespace  = "vault"
    service    = "vault"
    localPort  = "8200"
    remotePort = "8200"
  }
}

Otherwise, adding the root CA cert to your machine can be an option.

ninjadude333 commented 1 year ago

great, 10x. will give it a try.

On Wed, 21 Dec 2022 at 15:56, rickardgranberg @.***> wrote:

If you're running it in K8s and have the http port available in the cluster, you can use the kube_config block to port forward into the cluster:

provider "vaultoperator" { kube_config { path = "~/.kube/config" namespace = "vault" service = "vault" localPort = "8200" remotePort = "8200" } }

Otherwise, adding the root CA cert to your machine can be an option.

— Reply to this email directly, view it on GitHub https://github.com/rickardgranberg/terraform-provider-vaultoperator/issues/11#issuecomment-1361341798, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFL2R5YR5IASU4N5MJ3RNZDWOMEABANCNFSM6AAAAAATFSJF7I . You are receiving this because you authored the thread.Message ID: <rickardgranberg/terraform-provider-vaultoperator/issues/11/1361341798@ github.com>