Documentation ¶
Index ¶
- Constants
- Variables
- func ConstructSpecForClusterGroupScope(d *schema.ResourceData) (...)
- func ConstructSpecForClusterScope(d *schema.ResourceData) (...)
- func FlattenSpecForClusterGroupScope(...) (data []interface{})
- func FlattenSpecForClusterScope(...) (data []interface{})
- func HasSpecChanged(d *schema.ResourceData) bool
Constants ¶
View Source
const ( SpecKey = "spec" URLKey = "url" )
Variables ¶
View Source
var SpecSchema = &schema.Schema{ Type: schema.TypeList, Description: "Spec for the Repository.", Required: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ URLKey: { Type: schema.TypeString, Description: "URL of the git repository. Repository URL should begin with http, https, or ssh", Required: true, ValidateFunc: validation.IsURLWithScheme([]string{"http", "https", "ssh"}), }, secretRefKey: { Type: schema.TypeString, Description: "Reference to the secret. Repository credential.", Optional: true, Default: "", }, intervalKey: { Type: schema.TypeString, Description: "Interval at which to check gitrepository for updates. This is the interval at which Tanzu Mission Control will attempt to reconcile changes in the repository to the cluster. A sync interval of 0 would result in no future syncs. If no value is entered, a default interval of 5 minutes will be applied as `5m`.", Optional: true, Default: "5m", DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { durationInScript, err := time.ParseDuration(old) if err != nil { return false } durationInState, err := time.ParseDuration(new) if err != nil { return false } return durationInScript.Seconds() == durationInState.Seconds() }, }, gitImplementationKey: { Type: schema.TypeString, Description: "GitImplementation specifies which client library implementation to use. go-git is the default git implementation.", Optional: true, Default: fmt.Sprint(gitrepositoryclustermodel.VmwareTanzuManageV1alpha1ClusterNamespaceFluxcdGitrepositoryGitImplementationGOGIT), ValidateFunc: validation.StringInSlice([]string{ fmt.Sprint(gitrepositoryclustermodel.VmwareTanzuManageV1alpha1ClusterNamespaceFluxcdGitrepositoryGitImplementationGOGIT), fmt.Sprint(gitrepositoryclustermodel.VmwareTanzuManageV1alpha1ClusterNamespaceFluxcdGitrepositoryGitImplementationLIBGIT2), }, false), }, refKey: refSchema, }, }, }
Functions ¶
func ConstructSpecForClusterGroupScope ¶
func ConstructSpecForClusterGroupScope(d *schema.ResourceData) (spec *gitrepositoryclustergroupmodel.VmwareTanzuManageV1alpha1ClustergroupNamespaceFluxcdGitrepositorySpec)
func ConstructSpecForClusterScope ¶
func ConstructSpecForClusterScope(d *schema.ResourceData) (spec *gitrepositoryclustermodel.VmwareTanzuManageV1alpha1ClusterNamespaceFluxcdGitrepositorySpec)
func FlattenSpecForClusterGroupScope ¶
func FlattenSpecForClusterGroupScope(spec *gitrepositoryclustergroupmodel.VmwareTanzuManageV1alpha1ClustergroupNamespaceFluxcdGitrepositorySpec) (data []interface{})
func FlattenSpecForClusterScope ¶
func FlattenSpecForClusterScope(spec *gitrepositoryclustermodel.VmwareTanzuManageV1alpha1ClusterNamespaceFluxcdGitrepositorySpec) (data []interface{})
func HasSpecChanged ¶
func HasSpecChanged(d *schema.ResourceData) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.