Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change identity_ids type to Set #679

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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/data-sources/resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Optional:

Read-Only:

- `identity_ids` (List of String) A list of User Managed Identity ID's which should be assigned to the azure resource.
- `identity_ids` (Set of String) A set of User Managed Identity ID's which should be assigned to the azure resource.
- `principal_id` (String) The Principal ID for the Service Principal associated with the Managed Service Identity of this Azure resource.
- `tenant_id` (String) The Tenant ID for the Service Principal associated with the Managed Service Identity of this Azure resource.
- `type` (String) The Type of Identity which should be used for this azure resource. Possible values are `SystemAssigned`, `UserAssigned` and `SystemAssigned,UserAssigned`
2 changes: 1 addition & 1 deletion docs/resources/resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Required:

Optional:

- `identity_ids` (List of String) A list of User Managed Identity ID's which should be assigned to the azure resource.
- `identity_ids` (Set of String) A set of User Managed Identity ID's which should be assigned to the azure resource.

Read-Only:

Expand Down
2 changes: 1 addition & 1 deletion internal/docstrings/identity_ids.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package docstrings

const (
identityIds = `A list of User Managed Identity ID's which should be assigned to the azure resource.`
identityIds = `A set of User Managed Identity ID's which should be assigned to the azure resource.`
)

// IdentityIds returns the docstring for the identity type attribute.
Expand Down
7 changes: 4 additions & 3 deletions internal/services/azapi_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/cenkalti/backoff/v4"
"github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts"
"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/diag"
Expand Down Expand Up @@ -338,11 +339,11 @@ func (r *AzapiResource) Schema(ctx context.Context, _ resource.SchemaRequest, re
MarkdownDescription: docstrings.IdentityType(),
},

"identity_ids": schema.ListAttribute{
"identity_ids": schema.SetAttribute{
ElementType: types.StringType,
Optional: true,
Validators: []validator.List{
listvalidator.ValueStringsAre(myvalidator.StringIsUserAssignedIdentityID()),
Validators: []validator.Set{
setvalidator.ValueStringsAre(myvalidator.StringIsUserAssignedIdentityID()),
},
MarkdownDescription: docstrings.IdentityIds(),
},
Expand Down
2 changes: 1 addition & 1 deletion internal/services/azapi_resource_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (r *AzapiResourceDataSource) Schema(ctx context.Context, request datasource
MarkdownDescription: docstrings.IdentityTenantID(),
},

"identity_ids": schema.ListAttribute{
"identity_ids": schema.SetAttribute{
Computed: true,
ElementType: types.StringType,
MarkdownDescription: docstrings.IdentityIds(),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading