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 #557 from hmlanigan/storage-per-application
#557 ## Description FullStatus was called without a filter. The storage returned in the structure was assumed to be for the application being read. In reality it was for all application's in the model. Unfortunately piecing which storage is for which application is non-trivial as the data is embedded deep in the structure on a unit level. Instead call FullStatus with a filter of the application name when Reading, this ensures that the returned storage is for the current application only. Updated an application acceptance test to ensure storage isn't written for applications without storage. Fixes: #535, #539, #550 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## QA steps ```tf terraform { required_providers { juju = { version = ">0.12.0" source = "juju/juju" } } } provider "juju" { } resource "juju_model" "one" { name = "testing" } resource "juju_application" "test" { model = juju_model.one.name charm { name = "juju-qa-test" } } resource "juju_application" "githubrunner" { name = "github-runner" model = juju_model.one.name charm { name = "github-runner" channel = "latest/stable" base = "[email protected]" } units = 1 storage_directives = { runner = "2G" } } ``` ``` # output from the below should include storage_directive and storage $ terraform state show juju_application.githubrunner # output from below should not include any mention of storage $ terraform state show juju_application.test ``` ## Additional notes JUJU-6599
- Loading branch information