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

Setting an empty value for a Juju model's config key doesn't work #667

Open
Gmerold opened this issue Feb 12, 2025 · 3 comments
Open

Setting an empty value for a Juju model's config key doesn't work #667

Gmerold opened this issue Feb 12, 2025 · 3 comments
Labels
kind/bug indicates a bug in the project state/untriaged untriaged bug report

Comments

@Gmerold
Copy link

Gmerold commented Feb 12, 2025

Description

Hello Team,

While trying to deploy Canonical K8s on AWS using Terraform following the official How-to I've ran into a problem with setting an empty value for a Juju model's config key. Canonical K8s AWS deployment requires following Juju model settings:

container-networking-method = "local"
fan-config = ""

I've edited the TF module from the guide to include those:

resource "juju_model" "my_model" {
  name = "whatever"
  
  config = {
    container-networking-method = "local"
    fan-config = ""
  }
}

After applying container-networking-method is changed to local, but fan-config remains unchanged.
Handling this two config options might be an edge case which is not properly handed by the provider - before fan-config can be emptied container-networking-method needs to be changed from fan (default value) to something else.

Cheers,
Bart

Urgency

Annoying bug in our test suite

Terraform Juju Provider version

Tested with 0.14.0, 0.15.0 and 0.16.0

Terraform version

v1.10.5

Juju version

3.6.2

Terraform Configuration(s)

Reproduce / Test

Deploy Canonical K8s on AWS using Terraform with https://documentation.ubuntu.com/canonical-kubernetes/latest/charm/howto/install/install-terraform/

Debug/Panic Output

Notes & References

No response

@Gmerold Gmerold added kind/bug indicates a bug in the project state/untriaged untriaged bug report labels Feb 12, 2025
@dparv
Copy link

dparv commented Feb 18, 2025

+1

@peppepetra
Copy link

peppepetra commented Feb 18, 2025

This is blocking also deployment of Kubernetes on top of OpenStack

@peppepetra
Copy link

I can workaround with

resource "juju_model" "k8s" {
  name       = "k8s"
  credential = var.os_credentials
  cloud {
    name = var.os_cloud
  }

  config = {
    container-networking-method = "local"
    fan-config                  = ""
  }
  provisioner "local-exec" {
    command = "juju model-config fan-config=''"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug indicates a bug in the project state/untriaged untriaged bug report
Projects
None yet
Development

No branches or pull requests

3 participants