Skip to content

Commit

Permalink
Updating based on 06969ad36
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-github-team-tf-azure committed Jan 12, 2024
1 parent 472ff16 commit 258b833
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 146 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1042,37 +1042,6 @@ func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) {
return &out, nil
}

type ResourceIdentityType string

const (
ResourceIdentityTypeNone ResourceIdentityType = "None"
ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned"
)

func PossibleValuesForResourceIdentityType() []string {
return []string{
string(ResourceIdentityTypeNone),
string(ResourceIdentityTypeSystemAssigned),
string(ResourceIdentityTypeUserAssigned),
}
}

func parseResourceIdentityType(input string) (*ResourceIdentityType, error) {
vals := map[string]ResourceIdentityType{
"none": ResourceIdentityTypeNone,
"systemassigned": ResourceIdentityTypeSystemAssigned,
"userassigned": ResourceIdentityTypeUserAssigned,
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// otherwise presume it's an undefined value and best-effort it
out := ResourceIdentityType(input)
return &out, nil
}

type RestrictionLevel string

const (
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ package managedclusters

import (
"github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones"
"github.com/hashicorp/go-azure-helpers/resourcemanager/identity"
"github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type ManagedCluster struct {
ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"`
Id *string `json:"id,omitempty"`
Identity *ManagedClusterIdentity `json:"identity,omitempty"`
Location string `json:"location"`
Name *string `json:"name,omitempty"`
Properties *ManagedClusterProperties `json:"properties,omitempty"`
Sku *ManagedClusterSKU `json:"sku,omitempty"`
SystemData *systemdata.SystemData `json:"systemData,omitempty"`
Tags *map[string]string `json:"tags,omitempty"`
Type *string `json:"type,omitempty"`
ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"`
Id *string `json:"id,omitempty"`
Identity *identity.SystemOrUserAssignedMap `json:"identity,omitempty"`
Location string `json:"location"`
Name *string `json:"name,omitempty"`
Properties *ManagedClusterProperties `json:"properties,omitempty"`
Sku *ManagedClusterSKU `json:"sku,omitempty"`
SystemData *systemdata.SystemData `json:"systemData,omitempty"`
Tags *map[string]string `json:"tags,omitempty"`
Type *string `json:"type,omitempty"`
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -865,37 +865,6 @@ func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) {
return &out, nil
}

type ResourceIdentityType string

const (
ResourceIdentityTypeNone ResourceIdentityType = "None"
ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned"
)

func PossibleValuesForResourceIdentityType() []string {
return []string{
string(ResourceIdentityTypeNone),
string(ResourceIdentityTypeSystemAssigned),
string(ResourceIdentityTypeUserAssigned),
}
}

func parseResourceIdentityType(input string) (*ResourceIdentityType, error) {
vals := map[string]ResourceIdentityType{
"none": ResourceIdentityTypeNone,
"systemassigned": ResourceIdentityTypeSystemAssigned,
"userassigned": ResourceIdentityTypeUserAssigned,
}
if v, ok := vals[strings.ToLower(input)]; ok {
return &v, nil
}

// otherwise presume it's an undefined value and best-effort it
out := ResourceIdentityType(input)
return &out, nil
}

type ScaleDownMode string

const (
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ package managedclusters

import (
"github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones"
"github.com/hashicorp/go-azure-helpers/resourcemanager/identity"
"github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

type ManagedCluster struct {
ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"`
Id *string `json:"id,omitempty"`
Identity *ManagedClusterIdentity `json:"identity,omitempty"`
Location string `json:"location"`
Name *string `json:"name,omitempty"`
Properties *ManagedClusterProperties `json:"properties,omitempty"`
Sku *ManagedClusterSKU `json:"sku,omitempty"`
SystemData *systemdata.SystemData `json:"systemData,omitempty"`
Tags *map[string]string `json:"tags,omitempty"`
Type *string `json:"type,omitempty"`
ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"`
Id *string `json:"id,omitempty"`
Identity *identity.SystemOrUserAssignedMap `json:"identity,omitempty"`
Location string `json:"location"`
Name *string `json:"name,omitempty"`
Properties *ManagedClusterProperties `json:"properties,omitempty"`
Sku *ManagedClusterSKU `json:"sku,omitempty"`
SystemData *systemdata.SystemData `json:"systemData,omitempty"`
Tags *map[string]string `json:"tags,omitempty"`
Type *string `json:"type,omitempty"`
}

This file was deleted.

This file was deleted.

0 comments on commit 258b833

Please sign in to comment.