Skip to content

Commit

Permalink
feat: adds principal_type to role_assignments
Browse files Browse the repository at this point in the history
Also adds comments to remind maintainers to update embedded interfaces
  • Loading branch information
matt-FFFFFF authored and lonegunmanb committed Apr 25, 2024
1 parent b728a34 commit 8a9dd21
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
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

0 comments on commit 8a9dd21

Please sign in to comment.