From 05a113d266571c6a80f37bd2158501a8d0deb239 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 7 Mar 2025 03:18:24 +0000
Subject: [PATCH] build(deps): bump
github.com/orange-cloudavenue/terraform-plugin-framework-validators from
1.14.0 to 1.14.1 (#289)
Bumps
[github.com/orange-cloudavenue/terraform-plugin-framework-validators](https://github.com/orange-cloudavenue/terraform-plugin-framework-validators)
from 1.14.0 to 1.14.1.
Release notes
Sourced from github.com/orange-cloudavenue/terraform-plugin-framework-validators's
releases.
v1.14.1
:information_source: Notes
oneOf
- Improve markdown description rendering for
OneOfWithDescription
(string/int32/int64) validator. Change
to be rendered as a list instead of a single line. (GH-52)
Changelog
Sourced from github.com/orange-cloudavenue/terraform-plugin-framework-validators's
changelog.
1.14.1 (March 6, 2025)
:information_source: Notes
oneOf
- Improve markdown description rendering for
OneOfWithDescription
(string/int32/int64) validator. Change
to be rendered as a list instead of a single line. (GH-52)
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
---
go.mod | 2 +-
go.sum | 4 +-
.../resource_domain_role_assignments.go | 4 ++
.../resource_domain_workspace_assignments.go | 5 ++
...ource_domain_workspace_assignments_test.go | 65 ++++++++++++++++---
5 files changed, 68 insertions(+), 12 deletions(-)
diff --git a/go.mod b/go.mod
index 016ab3e..2772fae 100644
--- a/go.mod
+++ b/go.mod
@@ -21,7 +21,7 @@ require (
github.com/microsoft/fabric-sdk-go v0.1.0-beta.13
github.com/ohler55/ojg v1.26.1
github.com/orange-cloudavenue/terraform-plugin-framework-supertypes v0.5.0
- github.com/orange-cloudavenue/terraform-plugin-framework-validators v1.14.0
+ github.com/orange-cloudavenue/terraform-plugin-framework-validators v1.14.1
github.com/stretchr/testify v1.10.0
software.sslmate.com/src/go-pkcs12 v0.5.0
)
diff --git a/go.sum b/go.sum
index 4af4c56..681ff4f 100644
--- a/go.sum
+++ b/go.sum
@@ -177,8 +177,8 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
github.com/orange-cloudavenue/terraform-plugin-framework-supertypes v0.5.0 h1:0rogLDkZ5gbdEs0zNQ3orqLaLk5gwwF+8LxsnqWCcN8=
github.com/orange-cloudavenue/terraform-plugin-framework-supertypes v0.5.0/go.mod h1:16/Jv7sxRN3PhKkb7I2LAi7gtpQju65Kd+jmlE2st04=
-github.com/orange-cloudavenue/terraform-plugin-framework-validators v1.14.0 h1:75YLS0fcINW+DhBTlihE/zNYRgY5eWNj/UzKknKMaSc=
-github.com/orange-cloudavenue/terraform-plugin-framework-validators v1.14.0/go.mod h1:XRoHgbq0xhmUvb3Ti5EiwBaL4r/FHM+eawMH/m7gIqw=
+github.com/orange-cloudavenue/terraform-plugin-framework-validators v1.14.1 h1:7CR36U7x5Xy+y/OQmYbMpJ2g5cqNOkXrc++bGodyb/M=
+github.com/orange-cloudavenue/terraform-plugin-framework-validators v1.14.1/go.mod h1:XRoHgbq0xhmUvb3Ti5EiwBaL4r/FHM+eawMH/m7gIqw=
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
diff --git a/internal/services/domain/resource_domain_role_assignments.go b/internal/services/domain/resource_domain_role_assignments.go
index 6c1fbce..898242c 100644
--- a/internal/services/domain/resource_domain_role_assignments.go
+++ b/internal/services/domain/resource_domain_role_assignments.go
@@ -9,6 +9,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts"
+ "github.com/hashicorp/terraform-plugin-framework-validators/objectvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/resource"
@@ -108,6 +109,9 @@ func (r *resourceDomainRoleAssignments) Schema(ctx context.Context, _ resource.S
},
},
},
+ Validators: []validator.Object{
+ objectvalidator.IsRequired(),
+ },
},
},
"timeouts": timeouts.AttributesAll(ctx),
diff --git a/internal/services/domain/resource_domain_workspace_assignments.go b/internal/services/domain/resource_domain_workspace_assignments.go
index 358d393..1226dc3 100644
--- a/internal/services/domain/resource_domain_workspace_assignments.go
+++ b/internal/services/domain/resource_domain_workspace_assignments.go
@@ -9,11 +9,13 @@ import (
"slices"
"github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts"
+ "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
+ "github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog"
fabadmin "github.com/microsoft/fabric-sdk-go/fabric/admin"
@@ -78,6 +80,9 @@ func (r *resourceDomainWorkspaceAssignments) Schema(ctx context.Context, _ resou
MarkdownDescription: "The set of Workspace IDs.",
Required: true,
ElementType: customtypes.UUIDType{},
+ Validators: []validator.Set{
+ setvalidator.SizeAtLeast(1),
+ },
},
"timeouts": timeouts.AttributesAll(ctx),
},
diff --git a/internal/services/domain/resource_domain_workspace_assignments_test.go b/internal/services/domain/resource_domain_workspace_assignments_test.go
index 10b1ace..882e32a 100644
--- a/internal/services/domain/resource_domain_workspace_assignments_test.go
+++ b/internal/services/domain/resource_domain_workspace_assignments_test.go
@@ -76,16 +76,34 @@ func TestUnit_DomainWorkspaceAssignmentsResource_Attributes(t *testing.T) {
func TestAcc_DomainWorkspaceAssignmentsResource_CRUD(t *testing.T) {
domainResourceHCL := at.CompileConfig(
- at.ResourceHeader(testhelp.TypeName("fabric", itemTFName), "test"),
+ at.ResourceHeader(testhelp.TypeName("fabric", "domain"), "test"),
map[string]any{
"display_name": testhelp.RandomName(),
},
)
+ domainResourceFQN := testhelp.ResourceFQN("fabric", "domain", "test")
- domainResourceFQN := testhelp.ResourceFQN("fabric", itemTFName, "test")
+ workspace1ResourceHCL := at.CompileConfig(
+ at.ResourceHeader(testhelp.TypeName("fabric", "workspace"), "test1"),
+ map[string]any{
+ "display_name": testhelp.RandomName(),
+ },
+ )
+ workspace1ResourceFQN := testhelp.ResourceFQN("fabric", "workspace", "test1")
+
+ workspace2ResourceHCL := at.CompileConfig(
+ at.ResourceHeader(testhelp.TypeName("fabric", "workspace"), "test2"),
+ map[string]any{
+ "display_name": testhelp.RandomName(),
+ },
+ )
+ workspace2ResourceFQN := testhelp.ResourceFQN("fabric", "workspace", "test2")
+
+ // entity1 := testhelp.WellKnown()["WorkspaceRS"].(map[string]any)
+ // entity1ID := entity1["id"].(string)
- entity := testhelp.WellKnown()["WorkspaceRS"].(map[string]any)
- entityID := entity["id"].(string)
+ // entity2 := testhelp.WellKnown()["WorkspaceDS"].(map[string]any)
+ // entity2ID := entity2["id"].(string)
resource.Test(t, testhelp.NewTestAccCase(t, nil, nil, []resource.TestStep{
// Create and Read
@@ -93,19 +111,21 @@ func TestAcc_DomainWorkspaceAssignmentsResource_CRUD(t *testing.T) {
ResourceName: testResourceDomainWorkspaceAssignments,
Config: at.JoinConfigs(
domainResourceHCL,
+ workspace1ResourceHCL,
+ workspace2ResourceHCL,
at.CompileConfig(
testResourceDomainWorkspaceAssignmentsHeader,
map[string]any{
"domain_id": testhelp.RefByFQN(domainResourceFQN, "id"),
"workspace_ids": []string{
- entityID,
+ testhelp.RefByFQN(workspace1ResourceFQN, "id"),
},
},
),
),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr(testResourceDomainWorkspaceAssignments, "workspace_ids.#", "1"),
- resource.TestCheckResourceAttr(testResourceDomainWorkspaceAssignments, "workspace_ids.0", entityID),
+ // resource.TestCheckResourceAttr(testResourceDomainWorkspaceAssignments, "workspace_ids.0", entity1ID),
),
},
// Update and Read
@@ -113,16 +133,43 @@ func TestAcc_DomainWorkspaceAssignmentsResource_CRUD(t *testing.T) {
ResourceName: testResourceDomainWorkspaceAssignments,
Config: at.JoinConfigs(
domainResourceHCL,
+ workspace1ResourceHCL,
+ workspace2ResourceHCL,
at.CompileConfig(
testResourceDomainWorkspaceAssignmentsHeader,
map[string]any{
- "domain_id": testhelp.RefByFQN(domainResourceFQN, "id"),
- "workspace_ids": []string{},
+ "domain_id": testhelp.RefByFQN(domainResourceFQN, "id"),
+ "workspace_ids": []string{
+ testhelp.RefByFQN(workspace1ResourceFQN, "id"),
+ testhelp.RefByFQN(workspace2ResourceFQN, "id"),
+ },
},
),
),
Check: resource.ComposeAggregateTestCheckFunc(
- resource.TestCheckResourceAttr(testResourceDomainWorkspaceAssignments, "workspace_ids.#", "0"),
+ resource.TestCheckResourceAttr(testResourceDomainWorkspaceAssignments, "workspace_ids.#", "2"),
+ ),
+ },
+ // Update and Read
+ {
+ ResourceName: testResourceDomainWorkspaceAssignments,
+ Config: at.JoinConfigs(
+ domainResourceHCL,
+ workspace1ResourceHCL,
+ workspace2ResourceHCL,
+ at.CompileConfig(
+ testResourceDomainWorkspaceAssignmentsHeader,
+ map[string]any{
+ "domain_id": testhelp.RefByFQN(domainResourceFQN, "id"),
+ "workspace_ids": []string{
+ testhelp.RefByFQN(workspace2ResourceFQN, "id"),
+ },
+ },
+ ),
+ ),
+ Check: resource.ComposeAggregateTestCheckFunc(
+ resource.TestCheckResourceAttr(testResourceDomainWorkspaceAssignments, "workspace_ids.#", "1"),
+ // resource.TestCheckResourceAttr(testResourceDomainWorkspaceAssignments, "workspace_ids.0", entity2ID),
),
},
}))