Skip to content

Commit eefc036

Browse files
committed
sakuracloud_apprun_application: set ForceNew: true for name
1 parent 5534ab1 commit eefc036

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0
1212
github.com/mitchellh/go-homedir v1.1.0
1313
github.com/sacloud/api-client-go v0.2.10
14-
github.com/sacloud/apprun-api-go v0.2.1
14+
github.com/sacloud/apprun-api-go v0.3.0
1515
github.com/sacloud/autoscaler v0.16.1
1616
github.com/sacloud/iaas-api-go v1.14.0
1717
github.com/sacloud/iaas-service-go v1.10.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN
219219
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
220220
github.com/sacloud/api-client-go v0.2.10 h1:+rv3jDohD+pkdYwOTBiB+jZsM0xK3AxadXRzhp3q66c=
221221
github.com/sacloud/api-client-go v0.2.10/go.mod h1:Jj3CTy2+O4bcMedVDXlbHuqqche85HEPuVXoQFhLaRc=
222-
github.com/sacloud/apprun-api-go v0.2.1 h1:ji5E3xjnXE3MjrOMK0+DXK22bYrGPDO0OETL/QniZFQ=
223-
github.com/sacloud/apprun-api-go v0.2.1/go.mod h1:XB88c3BsZ8TBKNqN6K5+t/sJK+cg1PRRh2a1g4KBAzc=
222+
github.com/sacloud/apprun-api-go v0.3.0 h1:KOV6NLDE97RZrB9cyFpAHZdHdPovdZAQB6970aHJSpM=
223+
github.com/sacloud/apprun-api-go v0.3.0/go.mod h1:exDPXQMJIShaelI5LtXI3Ns7HwRLnYI8QuGFMd+pESM=
224224
github.com/sacloud/autoscaler v0.16.1 h1:W13gjBwRvYKw4bi4BZjFUUJNHMMARy45cq/YY6Mg2bE=
225225
github.com/sacloud/autoscaler v0.16.1/go.mod h1:Ai9bYmf+pHXrjQoHxmz/ST9vemYmPGmxex+feN12Iqs=
226226
github.com/sacloud/ftps v1.2.0 h1:7UlSWd7cnm1J+sANz7IiBV9ffVcS+4g6ZV5UHVVbvaw=

sakuracloud/resource_sakuracloud_apprun_application.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ func resourceSakuraCloudApprunApplication() *schema.Resource {
7979
Type: schema.TypeString,
8080
Required: true,
8181
Description: "The component name",
82+
ForceNew: true,
8283
},
8384
"max_cpu": {
8485
Type: schema.TypeString,
@@ -341,13 +342,11 @@ func resourceSakuraCloudApprunApplicationUpdate(ctx context.Context, d *schema.R
341342
return diag.Errorf("could not read SakuraCloud Apprun Application[%s]: %s", d.Id(), err)
342343
}
343344

344-
patchedName := d.Get("name").(string)
345345
patchedTimeoutSeconds := d.Get("timeout_seconds").(int)
346346
patchedPort := d.Get("port").(int)
347347
patchedMinScale := d.Get("min_scale").(int)
348348
patchedMaxScale := d.Get("max_scale").(int)
349349
params := v1.PatchApplicationBody{
350-
Name: &patchedName,
351350
TimeoutSeconds: &patchedTimeoutSeconds,
352351
Port: &patchedPort,
353352
MinScale: &patchedMinScale,

website/docs/r/apprun_application.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ resource "sakuracloud_apprun_application" "foobar" {
6868

6969
## Argument Reference
7070

71-
* `name` - (Required) The name of application.
71+
* `name` - (Required) The name of application. Changing this forces a new resource to be created.
7272
* `timeout_seconds` - (Required) The time limit between accessing the application's public URL, starting the instance, and receiving a response.
7373
* `port` - (Required) The port number where the application listens for requests.
7474
* `min_scale` - (Required) The minimum number of scales for the entire application.

0 commit comments

Comments
 (0)