rickardgranberg / terraform-provider-vaultoperator

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

exec functionality #19

Closed ElfoLiNk closed 1 year ago

ElfoLiNk commented 1 year ago

Fixes https://github.com/rickardgranberg/terraform-provider-vaultoperator/issues/15

ElfoLiNk commented 1 year ago

@rickardgranberg do you have time to review this ?

rickardgranberg commented 1 year ago

Sorry, been busy. Please run go fmt internal/provider/provider.go to fix the non-standard formatting

rickardgranberg commented 1 year ago

OK, one more thing: Update examples/provider/provider.tf and add the exec part:

provider "vaultoperator" {
  # example configuration here
  vault_url = "http://vault:8200"
  kube_config {
    path       = "~/.kube/config"
    namespace  = "vault"
    service    = "vault"
    localPort  = "8200"
    remotePort = "8200"
    # optional exec:
    exec {
      api_version = "client.authentication.k8s.io/v1beta1"
      args        = ["eks", "get-token", "--cluster-name", var.cluster_name]
      command     = "aws"
    }
  }
}

Then run go generate to update the docs