diff --git a/docs/resources/application.md b/docs/resources/application.md index af77dbae..aa695e3d 100644 --- a/docs/resources/application.md +++ b/docs/resources/application.md @@ -32,7 +32,7 @@ resource "juju_application" "this" { } } -resource "juju_application" "placement_example" { +resource "juju_application" "placement_and_storage_example" { name = "placement-example" model = juju_model.development.name charm { @@ -45,6 +45,10 @@ resource "juju_application" "placement_example" { units = 3 placement = "0,1,2" + storage = { + files = "101M" + } + config = { external-hostname = "..." } diff --git a/internal/provider/resource_application.go b/internal/provider/resource_application.go index 763d3e81..120e43cb 100644 --- a/internal/provider/resource_application.go +++ b/internal/provider/resource_application.go @@ -23,7 +23,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/tfsdk" diff --git a/internal/provider/resource_application_test.go b/internal/provider/resource_application_test.go index 3e26779a..c52cb61c 100644 --- a/internal/provider/resource_application_test.go +++ b/internal/provider/resource_application_test.go @@ -527,10 +527,7 @@ func TestAcc_ResourceApplication_Storage(t *testing.T) { modelName := acctest.RandomWithPrefix("tf-test-application-storage") appName := "test-app-storage" - storageConstraints := map[string]string{"label": "files", "size": "102M"} - - // trace plan - t.Log(testAccResourceApplicationStorage(modelName, appName, storageConstraints)) + storageConstraints := map[string]string{"label": "runner", "size": "102M"} resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -905,9 +902,9 @@ resource "juju_application" "{{.AppName}}" { model = juju_model.{{.ModelName}}.name name = "{{.AppName}}" charm { - name = "ubuntu" + name = "github-runner" channel = "latest/stable" - revision = 24 + revision = 177 } storage_directives = {