Documentation ¶
Index ¶
- Constants
- Variables
- func ConstructAllowedNameTag(data []interface{}) (...)
- func ConstructCommonRecipe(data []interface{}) (...)
- func ConstructCustom(data []interface{}) (...)
- func FlattenAllowedNameTag(...) (data []interface{})
- func FlattenCommonRecipe(...) (data []interface{})
- func FlattenCustom(...) (data []interface{})
Constants ¶
View Source
const ( AllowedNameTagKey = "allowed_name_tag" CustomKey = "custom" BlockLatestTagKey = "block_latest_tag" RequireDigestKey = "require_digest" AuditKey = "audit" RulesKey = "rules" HostNameKey = "hostname" ImageNameKey = "imagename" PortKey = "port" RequireKey = "requiredigest" TagKey = "tag" NegateKey = "negate" ValueKey = "value" )
Variables ¶
View Source
var AllowedNameTag = &schema.Schema{ Type: schema.TypeList, Description: "The input schema for image policy allowed-name-tag recipe version v1", Optional: true, ForceNew: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ AuditKey: { Type: schema.TypeBool, Description: "Audit (dry-run). Violations will be logged but not denied.", Optional: true, Default: false, }, RulesKey: { Type: schema.TypeList, Description: "It specifies a list of rules that defines allowed image patterns.", Required: true, MinItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ ImageNameKey: { Type: schema.TypeString, Description: "Allowed image names, wildcards are supported(for example: fooservice/*). Empty field is equivalent to *.", Optional: true, Default: "", }, TagKey: tag, }, }, }, }, }, }
View Source
var BlockLatestTag = &schema.Schema{ Type: schema.TypeList, Description: "The input schema for image policy block-latest-tag recipe version v1", Optional: true, ForceNew: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ AuditKey: { Type: schema.TypeBool, Description: "Audit (dry-run). Violations will be logged but not denied.", Optional: true, Default: false, }, }, }, }
View Source
var Custom = &schema.Schema{ Type: schema.TypeList, Description: "The input schema for image policy custom recipe version v1", Optional: true, ForceNew: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ AuditKey: { Type: schema.TypeBool, Description: "Audit (dry-run). Violations will be logged but not denied.", Optional: true, Default: false, }, RulesKey: { Type: schema.TypeList, Description: "It specifies a list of rules that defines allowed image patterns.", Required: true, MinItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ HostNameKey: { Type: schema.TypeString, Description: "Allowed image hostnames, wildcards are supported(for example: *.mycompany.com). Empty field is equivalent to *.", Optional: true, Default: "", }, ImageNameKey: { Type: schema.TypeString, Description: "Allowed image names, wildcards are supported(for example: fooservice/*). Empty field is equivalent to *.", Optional: true, Default: "", }, PortKey: { Type: schema.TypeString, Description: "Allowed port(if presented) of the image hostname, must associate with valid hostname. Wildcards are supported.", Optional: true, Default: "", }, RequireKey: { Type: schema.TypeBool, Description: "The flag used to enforce digest to appear in container images.", Optional: true, Default: false, }, TagKey: tag, }, }, }, }, }, }
View Source
var RequireDigest = &schema.Schema{ Type: schema.TypeList, Description: "The input schema for image policy require-digest recipe version v1", Optional: true, ForceNew: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ AuditKey: { Type: schema.TypeBool, Description: "Audit (dry-run). Violations will be logged but not denied.", Optional: true, Default: false, }, }, }, }
Functions ¶
func ConstructAllowedNameTag ¶
func ConstructAllowedNameTag(data []interface{}) (nameTag *policyrecipeimagemodel.VmwareTanzuManageV1alpha1CommonPolicySpecImageV1AllowedNameTag)
func ConstructCommonRecipe ¶
func ConstructCommonRecipe(data []interface{}) (common *policyrecipeimagemodel.VmwareTanzuManageV1alpha1CommonPolicySpecImageV1CommonRecipe)
func ConstructCustom ¶
func ConstructCustom(data []interface{}) (custom *policyrecipeimagemodel.VmwareTanzuManageV1alpha1CommonPolicySpecImageV1Custom)
func FlattenAllowedNameTag ¶
func FlattenAllowedNameTag(nameTag *policyrecipeimagemodel.VmwareTanzuManageV1alpha1CommonPolicySpecImageV1AllowedNameTag) (data []interface{})
func FlattenCommonRecipe ¶
func FlattenCommonRecipe(common *policyrecipeimagemodel.VmwareTanzuManageV1alpha1CommonPolicySpecImageV1CommonRecipe) (data []interface{})
func FlattenCustom ¶
func FlattenCustom(custom *policyrecipeimagemodel.VmwareTanzuManageV1alpha1CommonPolicySpecImageV1Custom) (data []interface{})
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.