open-vault/enos/modules/local_kind_cluster/main.tf
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

54 lines
1 KiB
HCL

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
terraform {
required_providers {
enos = {
source = "app.terraform.io/hashicorp-qti/enos"
}
random = {
source = "hashicorp/random"
version = ">= 3.4.3"
}
}
}
resource "random_pet" "cluster_name" {}
resource "enos_local_kind_cluster" "this" {
name = random_pet.cluster_name.id
kubeconfig_path = var.kubeconfig_path
}
variable "kubeconfig_path" {
type = string
}
output "cluster_name" {
value = random_pet.cluster_name.id
}
output "kubeconfig_base64" {
value = enos_local_kind_cluster.this.kubeconfig_base64
}
output "context_name" {
value = enos_local_kind_cluster.this.context_name
}
output "host" {
value = enos_local_kind_cluster.this.endpoint
}
output "client_certificate" {
value = enos_local_kind_cluster.this.client_certificate
}
output "client_key" {
value = enos_local_kind_cluster.this.client_key
}
output "cluster_ca_certificate" {
value = enos_local_kind_cluster.this.cluster_ca_certificate
}