You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attributes that expect UUIDs now validate whether their values are,
in fact, valid UUIDs. This catches cases where names were passed to
attributes accidentally worked.
Closes SSE-347.
Copy file name to clipboardExpand all lines: .changelog/0.21.0.toml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,5 +5,7 @@ title = "`oxide_ip_pool_silo_link`"
5
5
description = "The `id` attribute for the `oxide_ip_pool_silo_link` resource now uses the format `IP_POOL_ID/SILO_ID`, matching the `oxide_subnet_pool_silo_link` resource. [#794](https://github.com/oxidecomputer/terraform-provider-oxide/pull/794)"
6
6
7
7
[[enhancements]]
8
+
title = "Validate UUID Attributes"
9
+
description = "Attributes that expect UUIDs now validate whether their values are, in fact, valid UUIDs. This catches cases where names passed to attributes accidentally worked. [#795](https://github.com/oxidecomputer/terraform-provider-oxide/issues/795)."
// Ensure the implementation satisfies the expected interfaces.
@@ -242,6 +243,9 @@ This resource manages instances.
242
243
"project_id": schema.StringAttribute{
243
244
Required: true,
244
245
Description: "ID for the project containing this instance.",
246
+
Validators: []validator.String{
247
+
oxidevalidator.IsUUID(),
248
+
},
245
249
PlanModifiers: []planmodifier.String{
246
250
stringplanmodifier.RequiresReplace(),
247
251
},
@@ -314,6 +318,7 @@ This resource manages instances.
314
318
Optional: true,
315
319
MarkdownDescription: "ID of the disk the instance should be booted from. Specifying a boot disk is optional but recommended to ensure predictable boot behavior. When provided, this ID must also be present in `disk_attachments`.",
316
320
Validators: []validator.String{
321
+
oxidevalidator.IsUUID(),
317
322
stringvalidator.AlsoRequires(
318
323
path.MatchRoot("disk_attachments"),
319
324
),
@@ -379,6 +384,9 @@ This resource manages instances.
379
384
"subnet_id": schema.StringAttribute{
380
385
Required: true,
381
386
Description: "ID of the VPC subnet in which to create the instance network interface.",
0 commit comments