Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guides/migration_guide_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Hence it is named: `scaleway_object_bucket`.
### Migration guide for renamed resources

Because the resources changed their name, we cannot use automatic state migration.
We will first get the identifier of the resource, then remove the resource from the terraform state and then use [`terraform import`](https://www.terraform.io/docs/import/usage.html) to import existing resources to a renamed resource.
We will first get the identifier of the resource, then remove the resource from the terraform state and then use [`terraform import`](https://www.terraform.io/terraform/cli/import) to import existing resources to a renamed resource.

For instance, let's suppose that you have resource in `fr-par-1` such as:

Expand Down
2 changes: 1 addition & 1 deletion internal/services/edgeservices/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewEdgeServicesAPIWithRegion(d *schema.ResourceData, m any) (*edgeservices.
}

// edgeServicesAPIWithZone returns a new edge_services API and the zone
func edgeServicesAPIWithZone(d *schema.ResourceData, m interface{}) (*edgeservices.API, scw.Zone, error) {
func edgeServicesAPIWithZone(d *schema.ResourceData, m any) (*edgeservices.API, scw.Zone, error) {
api := edgeservices.NewAPI(meta.ExtractScwClient(m))

zone, err := meta.ExtractZone(d, m)
Expand Down
4 changes: 2 additions & 2 deletions internal/services/edgeservices/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func flattenLBBackendConfig(zone scw.Zone, lbConfigs *edge_services.ScalewayLBBa
inner := make([]any, len(lbConfigs.LBs))

for i, lbConfig := range lbConfigs.LBs {
inner[i] = map[string]interface{}{
inner[i] = map[string]any{
"id": zonal.NewIDString(zone, lbConfig.ID),
"frontend_id": zonal.NewIDString(zone, lbConfig.FrontendID),
"is_ssl": types.FlattenBoolPtr(lbConfig.IsSsl),
Expand All @@ -132,7 +132,7 @@ func flattenLBBackendConfig(zone scw.Zone, lbConfigs *edge_services.ScalewayLBBa
}
}

outer := []map[string]interface{}{{
outer := []map[string]any{{
"lb_config": inner,
}}

Expand Down
Loading