Skip to content
Merged
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
10 changes: 10 additions & 0 deletions stackit/internal/services/iaas/networkarea/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,16 @@ func (r *networkAreaResource) Create(ctx context.Context, req resource.CreateReq
networkAreaId := *networkArea.Id
ctx = tflog.SetField(ctx, "network_area_id", networkAreaId)

// Deprecated: Will be removed in May 2026. Only introduced to make the IaaS v1 -> v2 API migration non-breaking in the Terraform provider.
// persist state - just in case anything goes wrong while creating the network area region
ctx = utils.SetAndLogStateFields(ctx, &resp.Diagnostics, &resp.State, map[string]any{
"organization_id": model.OrganizationId.ValueString(),
"network_area_id": networkAreaId,
})
if resp.Diagnostics.HasError() {
return
}

// Map response body to schema
err = mapFields(ctx, networkArea, &model)
if err != nil {
Expand Down
Loading