Skip to content

Commit

Permalink
build(deps): bump github.com/orange-cloudavenue/terraform-plugin-fram…
Browse files Browse the repository at this point in the history
…ework-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.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/orange-cloudavenue/terraform-plugin-framework-validators/releases">github.com/orange-cloudavenue/terraform-plugin-framework-validators's
releases</a>.</em></p>
<blockquote>
<h2>v1.14.1</h2>
<h3>:information_source: <strong>Notes</strong></h3>
<ul>
<li><code>oneOf</code> - Improve markdown description rendering for
<code>OneOfWithDescription</code> (string/int32/int64) validator. Change
to be rendered as a list instead of a single line. (<a
href="https://redirect.github.com/orange-cloudavenue/terraform-plugin-framework-validators/issues/52">GH-52</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/orange-cloudavenue/terraform-plugin-framework-validators/blob/main/CHANGELOG.md">github.com/orange-cloudavenue/terraform-plugin-framework-validators's
changelog</a>.</em></p>
<blockquote>
<h2>1.14.1 (March  6, 2025)</h2>
<h3>:information_source: <strong>Notes</strong></h3>
<ul>
<li><code>oneOf</code> - Improve markdown description rendering for
<code>OneOfWithDescription</code> (string/int32/int64) validator. Change
to be rendered as a list instead of a single line. (<a
href="https://redirect.github.com/orange-cloudavenue/terraform-plugin-framework-validators/issues/52">GH-52</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/orange-cloudavenue/terraform-plugin-framework-validators/commit/afd68fba704d8a64c5bd6193effbb5c62885bae5"><code>afd68fb</code></a>
chore: Update CHANGELOG.md</li>
<li><a
href="https://github.com/orange-cloudavenue/terraform-plugin-framework-validators/commit/7c02444a44af930fcfe94915e9120ffe61bc8202"><code>7c02444</code></a>
chore(oneof): improve markdown description (<a
href="https://redirect.github.com/orange-cloudavenue/terraform-plugin-framework-validators/issues/52">#52</a>)</li>
<li><a
href="https://github.com/orange-cloudavenue/terraform-plugin-framework-validators/commit/ce863caabf2dcc78401a799f8314fc47d6939513"><code>ce863ca</code></a>
chore: Update CHANGELOG.md</li>
<li>See full diff in <a
href="https://github.com/orange-cloudavenue/terraform-plugin-framework-validators/compare/v1.14.0...v1.14.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/orange-cloudavenue/terraform-plugin-framework-validators&package-manager=go_modules&previous-version=1.14.0&new-version=1.14.1)](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)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

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 <dependency name> 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)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dariusz Porowski <[email protected]>
  • Loading branch information
dependabot[bot] and DariuszPorowski authored Mar 7, 2025
1 parent f718768 commit 05a113d
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 12 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 4 additions & 0 deletions internal/services/domain/resource_domain_role_assignments.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -108,6 +109,9 @@ func (r *resourceDomainRoleAssignments) Schema(ctx context.Context, _ resource.S
},
},
},
Validators: []validator.Object{
objectvalidator.IsRequired(),
},
},
},
"timeouts": timeouts.AttributesAll(ctx),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,53 +76,100 @@ 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
{
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
{
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),
),
},
}))
Expand Down

0 comments on commit 05a113d

Please sign in to comment.