canonical / canonical/postgresql-operator

PG16/edge not fully compatible with juju terraform provider v1 specification

Open
#1,539 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
20
Forks
36
Avg merge
4d 15h
Merged PRs (30d)
30

Description

## Steps to reproduce

Create a `main.tf` file using the terraform module:
```hcl
module "postgresql" {
source = "git::https://github.com/canonical/postgresql-operator//terraform?ref=v16/1.226.0"
app_name = "pg"
model_uuid = "uuid"
}
```

## Expected behavior

The plan should work as `model_uuid` is a mandatory variable for charm module charms as defined in spec [CC008](https://docs.google.com/document/d/1k1psLCfcf0Nr5KeVtWGFi9wmzhcg5AP9GVZTsRyVQSQ/edit?tab=t.0).

## Actual behavior

`terraform plan` returns the following error:
```shell
$ terraform plan

│ Error: Unsupported argument

│ on main.tf line 4, in module "postgresql":
│ 4: model_uuid = "uuid"

│ An argument named "model_uuid" is not expected here.
```

## Versions

Operating system: Ubuntu 24.04

Juju CLI: n/a

Juju agent: n/a

Charm revision: v16/1.226.°

LXD: n/a

## Log output

n/a

## Additional context

A `juju_model` variable has been introduced in https://github.com/canonical/postgresql-operator/pull/1319 instead of `model_uuid`. Probably because the spec was still under discussion.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.