forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.go
29 lines (24 loc) · 899 Bytes
/
schema.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package identity
import (
"github.com/kevinklinger/terraform-provider-azurerm/v2/internal/tf/pluginsdk"
)
type Type string
const (
none Type = "None"
systemAssigned Type = "SystemAssigned"
userAssigned Type = "UserAssigned"
systemAssignedUserAssigned Type = "SystemAssigned, UserAssigned"
)
type ExpandedConfig struct {
// Type is the type of User Assigned Identity, either `None`, `SystemAssigned`, `UserAssigned`
// or `SystemAssigned, UserAssigned`
Type Type `tfschema:"type"`
PrincipalId string `tfschema:"principal_id"`
TenantId string `tfschema:"tenant_id"`
UserAssignedIdentityIds []string `tfschema:"identity_ids"`
}
type Identity interface {
Expand(input []interface{}) (*ExpandedConfig, error)
Flatten(input *ExpandedConfig) []interface{}
Schema() *pluginsdk.Schema
}