-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #599 from hmlanigan/model-uuid-not-name
#599 ## Description Add uuid computed attribute to the juju_model resource. It already exists in the juju_model datasource. The sharedClient ModelUUID method will return the uuid if that's what provided as the ModelIdentifier, otherwise it will check the model cache to convert the model name to a model uuid. The model cache has been updated to key off the model uuid rather than name to facilitate differentiating models of the same name with different users. ## Type of change - Change existing resource - Logic changes in resources (the API interaction with Juju has been changed) ## QA steps The model and jaas access model acceptance tests have been updated to use and check for model UUID. Results can be seen in the GitHub Actions for this PR. Run the following plan with `terraform init && terraform plan && terraform apply` against a running juju 3.x controller. Verify that the correct model uuid is listed in the output by comparing with the output of `juju show-model testme | grep model-uuid` ```tf terraform { required_providers { juju = { version = ">= 0.14.0" source = "juju/juju" } } } provider "juju" { } resource "juju_model" "test" { name = "testme" } output { value = juju_model.test.uuid } ```
- Loading branch information
Showing
7 changed files
with
138 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.