From d6de0acc29747dda1d73a28ed1d16ba4d3598201 Mon Sep 17 00:00:00 2001 From: Orfeas Kourkakis Date: Thu, 19 Sep 2024 14:31:22 +0300 Subject: [PATCH] terraform: Update for 0.14 juju-provider (#201) Ref #196 --- charms/argo-controller/terraform/README.md | 5 ++++- charms/argo-controller/terraform/variables.tf | 5 ++--- charms/argo-controller/terraform/versions.tf | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/charms/argo-controller/terraform/README.md b/charms/argo-controller/terraform/README.md index f538621..1f6b930 100644 --- a/charms/argo-controller/terraform/README.md +++ b/charms/argo-controller/terraform/README.md @@ -2,6 +2,9 @@ This is a Terraform module facilitating the deployment of argo-controller charm, using the [Terraform juju provider](https://github.com/juju/terraform-provider-juju/). For more information, refer to the provider [documentation](https://registry.terraform.io/providers/juju/juju/latest/docs). +## Compatibility +This terraform module is compatible with charms of version >= 3.4 due to changes in the charm's relations. + ## Requirements This module requires a `juju` model to be available. Refer to the [usage section](#usage) below for more details. @@ -16,7 +19,7 @@ The module offers the following configurable inputs: | `channel`| string | Channel that the charm is deployed from | False | | `config`| map(string) | Map of the charm configuration options | False | | `model_name`| string | Name of the model that the charm is deployed on | True | -| `resources`| map(number) | Map of charm resources revisions | False | +| `resources`| map(string) | Map of the charm resources | False | | `revision`| number | Revision number of the charm name | False | ### Outputs diff --git a/charms/argo-controller/terraform/variables.tf b/charms/argo-controller/terraform/variables.tf index 67367c5..3b65b9e 100644 --- a/charms/argo-controller/terraform/variables.tf +++ b/charms/argo-controller/terraform/variables.tf @@ -21,10 +21,9 @@ variable "model_name" { type = string } -# TODO: Update to a map of strings, once juju provider 0.14 is released variable "resources" { - description = "Map of resources revisions" - type = map(number) + description = "Map of resources" + type = map(string) default = null } diff --git a/charms/argo-controller/terraform/versions.tf b/charms/argo-controller/terraform/versions.tf index 3e770f3..eb357ca 100644 --- a/charms/argo-controller/terraform/versions.tf +++ b/charms/argo-controller/terraform/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { juju = { source = "juju/juju" - version = "~> 0.13.0" + version = "~> 0.14.0" } } }