Help us shape the future of Go! Take the 2026 Go Developer Survey

workflowtemplate

package
v1.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResource

func NewResource() resource.Resource

NewResource is a helper function to simplify the provider implementation.

func RuntimeSourceToTerraType

func RuntimeSourceToTerraType(runtimeSource *workflowtemplates.RuntimeSource) (types.Object, diag.Diagnostics)

func VCSTriggersToTerraType

func VCSTriggersToTerraType(vcsTriggers *workflowtemplates.VCSTriggers) (types.Object, diag.Diagnostics)

func ValidateRuntimeSourceAuth added in v1.12.2

func ValidateRuntimeSourceAuth(ctx context.Context, runtimeSourceObj types.Object, attrPath path.Path) diag.Diagnostics

ValidateRuntimeSourceAuth validates the is_private/auth relationship on a git-based runtime_source, at the attrPath it was read from (e.g. path.Root("runtime_source")).

Rules:

  • is_private=true requires auth to be set.
  • Any source_config_dest_kind other than GIT_OTHER requires auth to be set, regardless of is_private — GIT_OTHER is the only kind that can be public/authless.
  • When auth is set: GIT_OTHER requires a "/secrets/" reference; every other kind requires a reference starting with "/integration" (matches "/integrations/..." and any other value beginning with that substring). For GIT_OTHER, auth may be set with is_private=false too — an access token for a public repository is valid.

func WorkflowTemplateRuntimeSourceConfig

func WorkflowTemplateRuntimeSourceConfig() map[string]schema.Attribute

Types

type RuntimeSourceConfigModel

type RuntimeSourceConfigModel struct {
	IsPrivate               types.Bool   `tfsdk:"is_private"`
	Auth                    types.String `tfsdk:"auth"`
	GitCoreAutoCrlf         types.Bool   `tfsdk:"git_core_auto_crlf"`
	GitSparseCheckoutConfig types.String `tfsdk:"git_sparse_checkout_config"`
	IncludeSubModule        types.Bool   `tfsdk:"include_sub_module"`
	Ref                     types.String `tfsdk:"ref"`
	Repo                    types.String `tfsdk:"repo"`
	WorkingDir              types.String `tfsdk:"working_dir"`
}

func (RuntimeSourceConfigModel) AttributeTypes

func (RuntimeSourceConfigModel) AttributeTypes() map[string]attr.Type

type RuntimeSourceModel

type RuntimeSourceModel struct {
	SourceConfigDestKind types.String `tfsdk:"source_config_dest_kind"`
	Config               types.Object `tfsdk:"config"`
}

func (RuntimeSourceModel) AttributeTypes

func (RuntimeSourceModel) AttributeTypes() map[string]attr.Type

func (RuntimeSourceModel) ToAPIModel

type VCSTriggersCreateRevisionModel

type VCSTriggersCreateRevisionModel struct {
	Enabled types.Bool `tfsdk:"enabled"`
}

func (VCSTriggersCreateRevisionModel) AttributeTypes

func (VCSTriggersCreateRevisionModel) AttributeTypes() map[string]attr.Type

type VCSTriggersCreateTagModel

type VCSTriggersCreateTagModel struct {
	CreateRevision types.Object `tfsdk:"create_revision"`
}

func (VCSTriggersCreateTagModel) AttributeTypes

func (VCSTriggersCreateTagModel) AttributeTypes() map[string]attr.Type

type VCSTriggersModel

type VCSTriggersModel struct {
	Type      types.String `tfsdk:"type"`
	CreateTag types.Object `tfsdk:"create_tag"`
}

func (VCSTriggersModel) AttributeTypes

func (VCSTriggersModel) AttributeTypes() map[string]attr.Type

type WorkflowTemplateResourceModel

type WorkflowTemplateResourceModel struct {
	Id               types.String `tfsdk:"id"`
	TemplateName     types.String `tfsdk:"template_name"`
	OwnerOrg         types.String `tfsdk:"owner_org"`
	SourceConfigKind types.String `tfsdk:"source_config_kind"`
	IsPublic         types.String `tfsdk:"is_public"`
	ShortDescription types.String `tfsdk:"description"`
	RuntimeSource    types.Object `tfsdk:"runtime_source"`
	SharedOrgsList   types.List   `tfsdk:"shared_orgs_list"`
	Tags             types.List   `tfsdk:"tags"`
	ContextTags      types.Map    `tfsdk:"context_tags"`
	VCSTriggers      types.Object `tfsdk:"vcs_triggers"`
}

func (*WorkflowTemplateResourceModel) ToAPIModel

func (*WorkflowTemplateResourceModel) ToUpdateAPIModel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL