Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform-provider-constellation: make kubeconfig output fine-grained #3334

Merged

Conversation

msanft
Copy link
Contributor

@msanft msanft commented Sep 3, 2024

Context

To directly plug in the Constellation Terraform provider into the kubernetes and helm providers, we need fine-grained outputs for cluster address, client certificate, key, etc.

To test this, consider the following Terraform snippet, which can be plugged into the AWS Terraform example configuration:

provider "kubernetes" {
  host = constellation_cluster.aws_example.host

  client_certificate     = constellation_cluster.aws_example.client_certificate
  client_key             = constellation_cluster.aws_example.client_key
  cluster_ca_certificate = constellation_cluster.aws_example.cluster_ca_certificate
}

data "kubernetes_nodes" "example" {}

output "node-ids" {
  value = [for node in data.kubernetes_nodes.example.nodes : node.spec.0.provider_id]
}

Proposed change(s)

  • Parse the kubeconfig returned through the init RPC and extract the respective values, making them available as outputs of the constellation_cluster resource.

Additional info

Checklist

  • Update docs
  • Add labels (e.g., for changelog category)
  • Is PR title adequate for changelog?
  • Link to Milestone

@msanft msanft added the feature This introduces new functionality label Sep 3, 2024
@msanft msanft added this to the v2.18.0 milestone Sep 3, 2024
@msanft msanft requested a review from daniel-weisse September 3, 2024 14:04
@msanft msanft requested a review from elchead as a code owner September 3, 2024 14:04
Copy link

netlify bot commented Sep 3, 2024

Deploy Preview for constellation-docs canceled.

Name Link
🔨 Latest commit 7700c37
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/66d7178ca197300008795a7c

Copy link
Contributor

github-actions bot commented Sep 3, 2024

Coverage report

Package Old New Trend
terraform-provider-constellation/internal/provider 3.60% 3.50% ↘️

@msanft msanft merged commit eab9aca into main Sep 3, 2024
14 of 15 checks passed
@msanft msanft deleted the msanft/terraform-provider-constellation/fine-grained-output branch September 3, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This introduces new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants