diff --git a/huaweicloud/provider.go b/huaweicloud/provider.go index c600c41c34..f8cd606d0d 100644 --- a/huaweicloud/provider.go +++ b/huaweicloud/provider.go @@ -1883,7 +1883,7 @@ func Provider() *schema.Provider { "huaweicloud_lb_pool": lb.ResourcePoolV2(), "huaweicloud_lb_whitelist": lb.ResourceWhitelistV2(), - "huaweicloud_live_bucket_authorization": live.ResourceLiveBucketAuthorization(), + "huaweicloud_live_bucket_authorization": live.ResourceBucketAuthorization(), "huaweicloud_live_channel": live.ResourceChannel(), "huaweicloud_live_disable_push_stream": live.ResourceDisablePushStream(), "huaweicloud_live_domain": live.ResourceDomain(), @@ -1895,7 +1895,7 @@ func Provider() *schema.Provider { "huaweicloud_live_record_callback": live.ResourceRecordCallback(), "huaweicloud_live_recording": live.ResourceRecording(), "huaweicloud_live_referer_validation": live.ResourceRefererValidation(), - "huaweicloud_live_snapshot": live.ResourceLiveSnapshot(), + "huaweicloud_live_snapshot": live.ResourceSnapshot(), "huaweicloud_live_transcoding": live.ResourceTranscoding(), "huaweicloud_live_url_authentication": live.ResourceUrlAuthentication(), "huaweicloud_live_url_validation": live.ResourceUrlValidation(), diff --git a/huaweicloud/services/acceptance/live/resource_huaweicloud_live_snapshot_test.go b/huaweicloud/services/acceptance/live/resource_huaweicloud_live_snapshot_test.go index aa58eeee0f..4d7badaf67 100644 --- a/huaweicloud/services/acceptance/live/resource_huaweicloud_live_snapshot_test.go +++ b/huaweicloud/services/acceptance/live/resource_huaweicloud_live_snapshot_test.go @@ -16,47 +16,40 @@ import ( ) func getLiveSnapshotResourceFunc(cfg *config.Config, state *terraform.ResourceState) (interface{}, error) { - region := acceptance.HW_REGION_NAME - // getLiveSnapshot: Query Live snapshot var ( - getLiveSnapshotHttpUrl = "v1/{project_id}/stream/snapshot" - getLiveSnapshotProduct = "live" + region = acceptance.HW_REGION_NAME + httpUrl = "v1/{project_id}/stream/snapshot" + product = "live" ) - getLiveSnapshotClient, err := cfg.NewServiceClient(getLiveSnapshotProduct, region) + client, err := cfg.NewServiceClient(product, region) if err != nil { - return nil, fmt.Errorf("error creating Live Client: %s", err) + return nil, fmt.Errorf("error creating Live client: %s", err) } parts := strings.SplitN(state.Primary.ID, "/", 2) if len(parts) != 2 { - return nil, fmt.Errorf("invalid id format, must be /") + return nil, fmt.Errorf("invalid ID format, want '/', but got '%s'", state.Primary.ID) } domainName := parts[0] appName := parts[1] - getLiveSnapshotPath := getLiveSnapshotClient.Endpoint + getLiveSnapshotHttpUrl - getLiveSnapshotPath = strings.ReplaceAll(getLiveSnapshotPath, "{project_id}", getLiveSnapshotClient.ProjectID) - - getLiveSnapshotQueryParams := buildGetLiveSnapshotQueryParams(domainName, appName) - getLiveSnapshotPath += getLiveSnapshotQueryParams - - getLiveSnapshotOpt := golangsdk.RequestOpts{ + requestPath := client.Endpoint + httpUrl + requestPath = strings.ReplaceAll(requestPath, "{project_id}", client.ProjectID) + requestPath += buildGetLiveSnapshotQueryParams(domainName, appName) + requestOpt := golangsdk.RequestOpts{ KeepResponseBody: true, - OkCodes: []int{ - 200, - }, } - getLiveSnapshotResp, err := getLiveSnapshotClient.Request("GET", getLiveSnapshotPath, &getLiveSnapshotOpt) + resp, err := client.Request("GET", requestPath, &requestOpt) if err != nil { return nil, fmt.Errorf("error retrieving Live snapshot: %s", err) } - getLiveSnapshotRespBody, err := utils.FlattenResponse(getLiveSnapshotResp) + respBody, err := utils.FlattenResponse(resp) if err != nil { return nil, err } - snapshot := utils.PathSearch("snapshot_config_list|[0]", getLiveSnapshotRespBody, nil) + snapshot := utils.PathSearch("snapshot_config_list|[0]", respBody, nil) if snapshot == nil { return nil, fmt.Errorf("error get live snapshot") } diff --git a/huaweicloud/services/live/resource_huaweicloud_live_bucket_authorization.go b/huaweicloud/services/live/resource_huaweicloud_live_bucket_authorization.go index 74ec73192a..d7cfca0374 100644 --- a/huaweicloud/services/live/resource_huaweicloud_live_bucket_authorization.go +++ b/huaweicloud/services/live/resource_huaweicloud_live_bucket_authorization.go @@ -16,15 +16,14 @@ import ( "github.com/chnsz/golangsdk" "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/config" - "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/utils" ) // @API Live PUT /v1/{project_id}/obs/authority -func ResourceLiveBucketAuthorization() *schema.Resource { +func ResourceBucketAuthorization() *schema.Resource { return &schema.Resource{ - CreateContext: resourceLiveBucketAuthorizationCreate, - ReadContext: resourceLiveBucketAuthorizationRead, - DeleteContext: resourceLiveBucketAuthorizationDelete, + CreateContext: resourceBucketAuthorizationCreate, + ReadContext: resourceBucketAuthorizationRead, + DeleteContext: resourceBucketAuthorizationDelete, Importer: &schema.ResourceImporter{ StateContext: schema.ImportStatePassthroughContext, }, @@ -46,51 +45,43 @@ func ResourceLiveBucketAuthorization() *schema.Resource { } } -func resourceLiveBucketAuthorizationCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - cfg := meta.(*config.Config) - region := cfg.GetRegion(d) - - // createLiveBucketAuthorization: create Live bucket authorization +func resourceBucketAuthorizationCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { var ( - createLiveBucketAuthorizationHttpUrl = "v1/{project_id}/obs/authority" - createLiveBucketAuthorizationProduct = "live" + cfg = meta.(*config.Config) + region = cfg.GetRegion(d) + httpUrl = "v1/{project_id}/obs/authority" + product = "live" ) - createLiveBucketAuthorizationClient, err := cfg.NewServiceClient(createLiveBucketAuthorizationProduct, region) + client, err := cfg.NewServiceClient(product, region) if err != nil { - return diag.Errorf("error creating Live Client: %s", err) + return diag.Errorf("error creating Live client: %s", err) } - createLiveBucketAuthorizationPath := createLiveBucketAuthorizationClient.Endpoint + createLiveBucketAuthorizationHttpUrl - createLiveBucketAuthorizationPath = strings.ReplaceAll(createLiveBucketAuthorizationPath, "{project_id}", - createLiveBucketAuthorizationClient.ProjectID) - - createLiveBucketAuthorizationOpt := golangsdk.RequestOpts{ + requestPath := client.Endpoint + httpUrl + requestPath = strings.ReplaceAll(requestPath, "{project_id}", client.ProjectID) + requestOpt := golangsdk.RequestOpts{ KeepResponseBody: true, - OkCodes: []int{ - 200, - }, + JSONBody: buildBucketAuthorizationBodyParams(d, 1), } - createLiveBucketAuthorizationOpt.JSONBody = utils.RemoveNil(buildLiveBucketAuthorizationBodyParams(d, 1)) - _, err = createLiveBucketAuthorizationClient.Request("PUT", createLiveBucketAuthorizationPath, - &createLiveBucketAuthorizationOpt) + _, err = client.Request("PUT", requestPath, &requestOpt) if err != nil { - return diag.Errorf("error creating Live bucket Authorization: %s", err) + return diag.Errorf("error creating Live bucket authorization: %s", err) } d.SetId(d.Get("bucket").(string)) - return resourceLiveBucketAuthorizationRead(ctx, d, meta) + return resourceBucketAuthorizationRead(ctx, d, meta) } -func buildLiveBucketAuthorizationBodyParams(d *schema.ResourceData, operation int) map[string]interface{} { +func buildBucketAuthorizationBodyParams(d *schema.ResourceData, operation int) map[string]interface{} { bodyParams := map[string]interface{}{ - "bucket": utils.ValueIgnoreEmpty(d.Get("bucket")), + "bucket": d.Get("bucket"), "operation": operation, } return bodyParams } -func resourceLiveBucketAuthorizationRead(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { +func resourceBucketAuthorizationRead(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { cfg := meta.(*config.Config) region := cfg.GetRegion(d) @@ -103,35 +94,28 @@ func resourceLiveBucketAuthorizationRead(_ context.Context, d *schema.ResourceDa return diag.FromErr(mErr.ErrorOrNil()) } -func resourceLiveBucketAuthorizationDelete(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - cfg := meta.(*config.Config) - region := cfg.GetRegion(d) - - // deleteLiveBucketAuthorization: Delete Live bucket Authorization +func resourceBucketAuthorizationDelete(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { var ( - deleteLiveBucketAuthorizationHttpUrl = "v1/{project_id}/obs/authority" - deleteLiveBucketAuthorizationProduct = "live" + cfg = meta.(*config.Config) + region = cfg.GetRegion(d) + httpUrl = "v1/{project_id}/obs/authority" + product = "live" ) - deleteLiveBucketAuthorizationClient, err := cfg.NewServiceClient(deleteLiveBucketAuthorizationProduct, region) + client, err := cfg.NewServiceClient(product, region) if err != nil { - return diag.Errorf("error creating Live Client: %s", err) + return diag.Errorf("error creating Live client: %s", err) } - deleteLiveBucketAuthorizationPath := deleteLiveBucketAuthorizationClient.Endpoint + deleteLiveBucketAuthorizationHttpUrl - deleteLiveBucketAuthorizationPath = strings.ReplaceAll(deleteLiveBucketAuthorizationPath, "{project_id}", - deleteLiveBucketAuthorizationClient.ProjectID) - - deleteLiveBucketAuthorizationOpt := golangsdk.RequestOpts{ + requestPath := client.Endpoint + httpUrl + requestPath = strings.ReplaceAll(requestPath, "{project_id}", client.ProjectID) + requestOpt := golangsdk.RequestOpts{ KeepResponseBody: true, - OkCodes: []int{ - 200, - }, + JSONBody: buildBucketAuthorizationBodyParams(d, 0), } - deleteLiveBucketAuthorizationOpt.JSONBody = utils.RemoveNil(buildLiveBucketAuthorizationBodyParams(d, 0)) - _, err = deleteLiveBucketAuthorizationClient.Request("PUT", deleteLiveBucketAuthorizationPath, - &deleteLiveBucketAuthorizationOpt) + _, err = client.Request("PUT", requestPath, + &requestOpt) if err != nil { - return diag.Errorf("error deleting Live bucket Authorization: %s", err) + return diag.Errorf("error deleting Live bucket authorization: %s", err) } return nil diff --git a/huaweicloud/services/live/resource_huaweicloud_live_channel.go b/huaweicloud/services/live/resource_huaweicloud_live_channel.go index 36381e791a..7e990a1bd3 100644 --- a/huaweicloud/services/live/resource_huaweicloud_live_channel.go +++ b/huaweicloud/services/live/resource_huaweicloud_live_channel.go @@ -1,8 +1,3 @@ -// --------------------------------------------------------------- -// *** AUTO GENERATED CODE *** -// @Product Live -// --------------------------------------------------------------- - package live import ( diff --git a/huaweicloud/services/live/resource_huaweicloud_live_domain.go b/huaweicloud/services/live/resource_huaweicloud_live_domain.go index daec10ef6c..77ad1ea3d6 100644 --- a/huaweicloud/services/live/resource_huaweicloud_live_domain.go +++ b/huaweicloud/services/live/resource_huaweicloud_live_domain.go @@ -25,6 +25,7 @@ import ( // @API Live POST /v1/{project_id}/domain // @API Live DELETE /v1/{project_id}/domains_mapping // @API Live PUT /v1/{project_id}/domains_mapping +// @API Live PUT /v1/{project_id}/domain/ipv6-switch func ResourceDomain() *schema.Resource { return &schema.Resource{ CreateContext: resourceDomainCreate, diff --git a/huaweicloud/services/live/resource_huaweicloud_live_snapshot.go b/huaweicloud/services/live/resource_huaweicloud_live_snapshot.go index 37a7f1ba8f..3fb29e9ded 100644 --- a/huaweicloud/services/live/resource_huaweicloud_live_snapshot.go +++ b/huaweicloud/services/live/resource_huaweicloud_live_snapshot.go @@ -25,12 +25,12 @@ import ( // @API Live GET /v1/{project_id}/stream/snapshot // @API Live POST /v1/{project_id}/stream/snapshot // @API Live PUT /v1/{project_id}/stream/snapshot -func ResourceLiveSnapshot() *schema.Resource { +func ResourceSnapshot() *schema.Resource { return &schema.Resource{ - CreateContext: resourceLiveSnapshotCreate, - UpdateContext: resourceLiveSnapshotUpdate, - ReadContext: resourceLiveSnapshotRead, - DeleteContext: resourceLiveSnapshotDelete, + CreateContext: resourceSnapshotCreate, + UpdateContext: resourceSnapshotUpdate, + ReadContext: resourceSnapshotRead, + DeleteContext: resourceSnapshotDelete, Importer: &schema.ResourceImporter{ StateContext: schema.ImportStatePassthroughContext, }, @@ -96,32 +96,25 @@ func ResourceLiveSnapshot() *schema.Resource { } } -func resourceLiveSnapshotCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - cfg := meta.(*config.Config) - region := cfg.GetRegion(d) - - // createLiveSnapshot: create Live snapshot +func resourceSnapshotCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { var ( - createLiveSnapshotHttpUrl = "v1/{project_id}/stream/snapshot" - createLiveSnapshotProduct = "live" + cfg = meta.(*config.Config) + region = cfg.GetRegion(d) + httpUrl = "v1/{project_id}/stream/snapshot" + product = "live" ) - createLiveSnapshotClient, err := cfg.NewServiceClient(createLiveSnapshotProduct, region) + client, err := cfg.NewServiceClient(product, region) if err != nil { - return diag.Errorf("error creating Live Client: %s", err) + return diag.Errorf("error creating Live client: %s", err) } - createLiveSnapshotPath := createLiveSnapshotClient.Endpoint + createLiveSnapshotHttpUrl - createLiveSnapshotPath = strings.ReplaceAll(createLiveSnapshotPath, "{project_id}", - createLiveSnapshotClient.ProjectID) - - createLiveSnapshotOpt := golangsdk.RequestOpts{ + requestPath := client.Endpoint + httpUrl + requestPath = strings.ReplaceAll(requestPath, "{project_id}", client.ProjectID) + requestOpt := golangsdk.RequestOpts{ KeepResponseBody: true, - OkCodes: []int{ - 200, - }, + JSONBody: utils.RemoveNil(buildCreateLiveSnapshotBodyParams(d, region)), } - createLiveSnapshotOpt.JSONBody = utils.RemoveNil(buildCreateLiveSnapshotBodyParams(d, region)) - _, err = createLiveSnapshotClient.Request("POST", createLiveSnapshotPath, &createLiveSnapshotOpt) + _, err = client.Request("POST", requestPath, &requestOpt) if err != nil { return diag.Errorf("error creating Live snapshot: %s", err) } @@ -131,7 +124,7 @@ func resourceLiveSnapshotCreate(ctx context.Context, d *schema.ResourceData, met d.SetId(domainName + "/" + appName) - return resourceLiveSnapshotRead(ctx, d, meta) + return resourceSnapshotRead(ctx, d, meta) } func buildCreateLiveSnapshotBodyParams(d *schema.ResourceData, region string) map[string]interface{} { @@ -157,53 +150,44 @@ func buildLiveSnapshotObsLocationChildBody(d *schema.ResourceData, region string return params } -func resourceLiveSnapshotRead(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - cfg := meta.(*config.Config) - region := cfg.GetRegion(d) - - var mErr *multierror.Error - - // getLiveSnapshot: Query Live snapshot +func resourceSnapshotRead(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { var ( - getLiveSnapshotHttpUrl = "v1/{project_id}/stream/snapshot" - getLiveSnapshotProduct = "live" + cfg = meta.(*config.Config) + region = cfg.GetRegion(d) + mErr *multierror.Error + httpUrl = "v1/{project_id}/stream/snapshot" + product = "live" ) - getLiveSnapshotClient, err := cfg.NewServiceClient(getLiveSnapshotProduct, region) + client, err := cfg.NewServiceClient(product, region) if err != nil { - return diag.Errorf("error creating Live Client: %s", err) + return diag.Errorf("error creating Live client: %s", err) } parts := strings.SplitN(d.Id(), "/", 2) if len(parts) != 2 { - return diag.Errorf("invalid id format, must be /") + return diag.Errorf("invalid ID format, want '/', but got '%s'", d.Id()) } domainName := parts[0] appName := parts[1] - getLiveSnapshotPath := getLiveSnapshotClient.Endpoint + getLiveSnapshotHttpUrl - getLiveSnapshotPath = strings.ReplaceAll(getLiveSnapshotPath, "{project_id}", getLiveSnapshotClient.ProjectID) - - getLiveSnapshotQueryParams := buildGetLiveSnapshotQueryParams(domainName, appName) - getLiveSnapshotPath += getLiveSnapshotQueryParams - - getLiveSnapshotOpt := golangsdk.RequestOpts{ + requestPath := client.Endpoint + httpUrl + requestPath = strings.ReplaceAll(requestPath, "{project_id}", client.ProjectID) + requestPath += buildGetSnapshotQueryParams(domainName, appName) + requestOpt := golangsdk.RequestOpts{ KeepResponseBody: true, - OkCodes: []int{ - 200, - }, } - getLiveSnapshotResp, err := getLiveSnapshotClient.Request("GET", getLiveSnapshotPath, &getLiveSnapshotOpt) + resp, err := client.Request("GET", requestPath, &requestOpt) if err != nil { return common.CheckDeletedDiag(d, err, "error retrieving Live snapshot") } - getLiveSnapshotRespBody, err := utils.FlattenResponse(getLiveSnapshotResp) + respBody, err := utils.FlattenResponse(resp) if err != nil { return diag.FromErr(err) } - snapshot := utils.PathSearch("snapshot_config_list|[0]", getLiveSnapshotRespBody, nil) + snapshot := utils.PathSearch("snapshot_config_list|[0]", respBody, nil) if snapshot == nil { return common.CheckDeletedDiag(d, golangsdk.ErrDefault404{}, "") } @@ -225,15 +209,15 @@ func resourceLiveSnapshotRead(_ context.Context, d *schema.ResourceData, meta in return diag.FromErr(mErr.ErrorOrNil()) } -func buildGetLiveSnapshotQueryParams(domainName, appName string) string { +func buildGetSnapshotQueryParams(domainName, appName string) string { return fmt.Sprintf("?domain=%s&app_name=%s", domainName, appName) } -func resourceLiveSnapshotUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { +func resourceSnapshotUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { cfg := meta.(*config.Config) region := cfg.GetRegion(d) - updateLiveSnapshotHasChanges := []string{ + updateSnapshotHasChanges := []string{ "frequency", "storage_mode", "storage_bucket", @@ -243,34 +227,28 @@ func resourceLiveSnapshotUpdate(ctx context.Context, d *schema.ResourceData, met "call_back_auth_key", } - if d.HasChanges(updateLiveSnapshotHasChanges...) { - // updateLiveSnapshot: update Live snapshot + if d.HasChanges(updateSnapshotHasChanges...) { var ( - updateLiveSnapshotHttpUrl = "v1/{project_id}/stream/snapshot" - updateLiveSnapshotProduct = "live" + httpUrl = "v1/{project_id}/stream/snapshot" + product = "live" ) - updateLiveSnapshotClient, err := cfg.NewServiceClient(updateLiveSnapshotProduct, region) + client, err := cfg.NewServiceClient(product, region) if err != nil { - return diag.Errorf("error creating Live Client: %s", err) + return diag.Errorf("error creating Live client: %s", err) } - updateLiveSnapshotPath := updateLiveSnapshotClient.Endpoint + updateLiveSnapshotHttpUrl - updateLiveSnapshotPath = strings.ReplaceAll(updateLiveSnapshotPath, "{project_id}", - updateLiveSnapshotClient.ProjectID) - - updateLiveSnapshotOpt := golangsdk.RequestOpts{ + requestPath := client.Endpoint + httpUrl + requestPath = strings.ReplaceAll(requestPath, "{project_id}", client.ProjectID) + requestOpt := golangsdk.RequestOpts{ KeepResponseBody: true, - OkCodes: []int{ - 200, - }, + JSONBody: utils.RemoveNil(buildUpdateLiveSnapshotBodyParams(d, region)), } - updateLiveSnapshotOpt.JSONBody = utils.RemoveNil(buildUpdateLiveSnapshotBodyParams(d, region)) - _, err = updateLiveSnapshotClient.Request("PUT", updateLiveSnapshotPath, &updateLiveSnapshotOpt) + _, err = client.Request("PUT", requestPath, &requestOpt) if err != nil { return diag.Errorf("error updating Live snapshot: %s", err) } } - return resourceLiveSnapshotRead(ctx, d, meta) + return resourceSnapshotRead(ctx, d, meta) } func buildUpdateLiveSnapshotBodyParams(d *schema.ResourceData, region string) map[string]interface{} { @@ -287,34 +265,25 @@ func buildUpdateLiveSnapshotBodyParams(d *schema.ResourceData, region string) ma return bodyParams } -func resourceLiveSnapshotDelete(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - cfg := meta.(*config.Config) - region := cfg.GetRegion(d) - - // deleteLiveSnapshot: Delete Live snapshot +func resourceSnapshotDelete(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { var ( - deleteLiveSnapshotHttpUrl = "v1/{project_id}/stream/snapshot" - deleteLiveSnapshotProduct = "live" + cfg = meta.(*config.Config) + region = cfg.GetRegion(d) + httpUrl = "v1/{project_id}/stream/snapshot" + product = "live" ) - deleteLiveSnapshotClient, err := cfg.NewServiceClient(deleteLiveSnapshotProduct, region) + client, err := cfg.NewServiceClient(product, region) if err != nil { - return diag.Errorf("error creating Live Client: %s", err) + return diag.Errorf("error creating Live client: %s", err) } - deleteLiveSnapshotPath := deleteLiveSnapshotClient.Endpoint + deleteLiveSnapshotHttpUrl - deleteLiveSnapshotPath = strings.ReplaceAll(deleteLiveSnapshotPath, "{project_id}", - deleteLiveSnapshotClient.ProjectID) - - deleteLiveSnapshotParams := buildDeleteLiveSnapshotParams(d) - deleteLiveSnapshotPath += deleteLiveSnapshotParams - - deleteLiveSnapshotOpt := golangsdk.RequestOpts{ + requestPath := client.Endpoint + httpUrl + requestPath = strings.ReplaceAll(requestPath, "{project_id}", client.ProjectID) + requestPath += buildDeleteSnapshotParams(d) + requestOpt := golangsdk.RequestOpts{ KeepResponseBody: true, - OkCodes: []int{ - 200, - }, } - _, err = deleteLiveSnapshotClient.Request("DELETE", deleteLiveSnapshotPath, &deleteLiveSnapshotOpt) + _, err = client.Request("DELETE", requestPath, &requestOpt) if err != nil { return diag.Errorf("error deleting Live snapshot: %s", err) } @@ -322,6 +291,6 @@ func resourceLiveSnapshotDelete(_ context.Context, d *schema.ResourceData, meta return nil } -func buildDeleteLiveSnapshotParams(d *schema.ResourceData) string { +func buildDeleteSnapshotParams(d *schema.ResourceData) string { return fmt.Sprintf("?domain=%v&app_name=%v", d.Get("domain_name"), d.Get("app_name")) }