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

feat: adds principal_type to role_assignments #24

Merged
merged 1 commit into from
Apr 25, 2024
Merged
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
3 changes: 3 additions & 0 deletions interfaces/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import (
"github.com/zclconf/go-cty/cty"
)

// LockTypeString is the type constraint string for lock interface.
// When updating the type constraint string, make sure to also update the two
// private endpoint interfaces (the one with subresource and the one without).
var LockTypeString = `object({
kind = string
name = optional(string, null)
Expand Down
1 change: 1 addition & 0 deletions interfaces/private_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var PrivateEndpointTypeString = `map(object({
condition = optional(string, null)
condition_version = optional(string, null)
delegated_managed_identity_resource_id = optional(string, null)
principal_type = optional(string, null)
})), {})
lock = optional(object({
kind = string
Expand Down
1 change: 1 addition & 0 deletions interfaces/private_endpoints_with_subresource_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var PrivateEndpointWithSubresourceNameTypeString = `map(object({
condition = optional(string, null)
condition_version = optional(string, null)
delegated_managed_identity_resource_id = optional(string, null)
principal_type = optional(string, null)
})), {})
lock = optional(object({
kind = string
Expand Down
4 changes: 4 additions & 0 deletions interfaces/role_assignments.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import (
"github.com/zclconf/go-cty/cty"
)

// RoleAssignmentsTypeString is the type constraint string for role assignments.
// When updating the type constraint string, make sure to also update the two
// private endpoint interfaces (the one with subresource and the one without).
var RoleAssignmentsTypeString = `map(object({
role_definition_id_or_name = string
principal_id = string
Expand All @@ -13,6 +16,7 @@ var RoleAssignmentsTypeString = `map(object({
condition = optional(string, null)
condition_version = optional(string, null)
delegated_managed_identity_resource_id = optional(string, null)
principal_type = optional(string, null)
}))`

var roleAssignmentsType = StringToTypeConstraintWithDefaults(RoleAssignmentsTypeString)
Expand Down
3 changes: 3 additions & 0 deletions interfaces/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import (
"github.com/zclconf/go-cty/cty"
)

// TagsTypeString is the type constraint string for tags.
// When updating the type constraint string, make sure to also update the two
// private endpoint interfaces (the one with subresource and the one without).
var TagsTypeString = `map(string)`

var tagsType = StringToTypeConstraintWithDefaults(TagsTypeString)
Expand Down