Linking Runtimes Via Terraform
For Teams using Terraform Only!
If you have not configured IaC for your team you can skip the next section "Connecting Prodvana with IaC" and repeat the steps in Link Kubernetes Cluster for each cluster you listed in your worksheet.
For small teams and startups we recommend using IaC to configure your Runtimes Only.
It is possible to configure Applications and Release Channels within Terraform this is a more advanced configuration.
Step 1: Setup Up Authentication for Terraform
Step 2: Configure Prodvana's Terraform Provider
Refer to your worksheet list of Kubernetes clusters that you plan on linking to Prodvana and add the following Terraform in the appropriate place in your configuration. You should note the names of the Runtimes you use. They will be used later.
Replace the names as appropriate for your configuration
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "4.74.0"
}
prodvana = {
source = "prodvana/prodvana"
version = "0.1.15"
}
}
}
provider "prodvana" { }
resource "google_container_cluster" "my-cluster" {
name = "my-cluster" // replace
location = "us-central1-a"
// Additional configuration...
}
resource "prodvana_managed_k8s_runtime" "my-runtime" {
name = "my-runtime" // replace
host = google_container_cluster.my-cluster.endpoint
cluster_ca_certificate = base64decode(google_container_cluster.my-cluster.master_auth.0.cluster_ca_certificate)
exec = {
api_version = "client.authentication.k8s.io/v1beta1"
command = "gke-gcloud-auth-plugin"
args = ["--use_application_default_credentials"]
}
}
Linking Runtimes should not require optional parameters!
Step 3: Write down your Runtime names.
Document the names you used for your Runtime names. These will be used in the next section.
Step 4: Apply your Terraform.
Step 5: Confirm Runtimes connected
Navigate to your Prodvana WebUI and click on "Runtimes" in the left hand Navigation Menu.
Each Runtime you added should indicate that it is "Connected."
Updated 11 months ago