Documentation ¶
Index ¶
- Constants
- Variables
- func ConstructNamespaceSelector(data []interface{}) (...)
- func FlattenNamespaceSelector(...) (data []interface{})
- func MetaResourceAttributeCheck(resourceName string) []resource.TestCheckFunc
- func ValidateSpecLabelSelectorRequirement(ctx context.Context, diff *schema.ResourceDiff, i interface{}) error
- type Cluster
- type ClusterGroup
- type ScopeHelperResources
- type Workspace
Constants ¶
View Source
const ( NamespaceSelectorKey = "namespace_selector" MatchExpressionsKey = "match_expressions" KeyKey = "key" OperatorKey = "operator" ValuesKey = "values" SpecKey = "spec" NameKey = "name" InputKey = "input" RecipeVersionDefaultValue = "v1" UnknownRecipe = "" )
Variables ¶
View Source
var NamespaceSelector = &schema.Schema{ Type: schema.TypeList, Description: "Label based Namespace Selector for the policy", Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ MatchExpressionsKey: { Type: schema.TypeList, Description: "Match expressions is a list of label selector requirements, the requirements are ANDed", Required: true, Elem: labelSelectorRequirement, }, }, }, }
Functions ¶
func ConstructNamespaceSelector ¶
func ConstructNamespaceSelector(data []interface{}) (namespaceSelector *policymodel.VmwareTanzuManageV1alpha1CommonPolicyLabelSelector)
func FlattenNamespaceSelector ¶
func FlattenNamespaceSelector(namespaceSelector *policymodel.VmwareTanzuManageV1alpha1CommonPolicyLabelSelector) (data []interface{})
func MetaResourceAttributeCheck ¶
func MetaResourceAttributeCheck(resourceName string) []resource.TestCheckFunc
func ValidateSpecLabelSelectorRequirement ¶ added in v1.1.3
func ValidateSpecLabelSelectorRequirement(ctx context.Context, diff *schema.ResourceDiff, i interface{}) error
Types ¶
type ClusterGroup ¶ added in v1.1.3
type ScopeHelperResources ¶ added in v1.1.3
type ScopeHelperResources struct { Meta string Cluster *Cluster ClusterGroup *ClusterGroup Workspace *Workspace OrgID string }
func NewScopeHelperResources ¶ added in v1.1.3
func NewScopeHelperResources() *ScopeHelperResources
func (*ScopeHelperResources) GetTestPolicyResourceHelperAndScope ¶ added in v1.1.3
func (shr *ScopeHelperResources) GetTestPolicyResourceHelperAndScope(scopeType scope.Scope, scopesAllowed []string) (string, string)
GetTestPolicyResourceHelperAndScope builds the helper resource and scope blocks for policy resource based on a scope type.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
kind
|
|
custom/recipe
Package recipe contains schema and helper functions for different input recipes.
|
Package recipe contains schema and helper functions for different input recipes. |
security/recipe
Package recipe contains schema and helper functions for different input recipes.
|
Package recipe contains schema and helper functions for different input recipes. |
Package scope contains schema and helper functions for different policy scopes.
|
Package scope contains schema and helper functions for different policy scopes. |
Click to show internal directories.
Click to hide internal directories.