Documentation
¶
Index ¶
- func NewResource() resource.Resource
- func RuntimeSourceToTerraType(runtimeSource *workflowtemplates.RuntimeSource) (types.Object, diag.Diagnostics)
- func VCSTriggersToAPIModel(ctx context.Context, m types.Object) (*workflowtemplates.VCSTriggers, diag.Diagnostics)
- func VCSTriggersToTerraType(vcsTriggers *workflowtemplates.VCSTriggers) (types.Object, diag.Diagnostics)
- func ValidateRuntimeSourceAuth(ctx context.Context, runtimeSourceObj types.Object, attrPath path.Path) diag.Diagnostics
- func WorkflowTemplateRuntimeSourceConfig() map[string]schema.Attribute
- type RuntimeSourceConfigModel
- type RuntimeSourceModel
- type VCSTriggersCreateRevisionModel
- type VCSTriggersCreateTagModel
- type VCSTriggersModel
- type WorkflowTemplateResourceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResource ¶
NewResource is a helper function to simplify the provider implementation.
func RuntimeSourceToTerraType ¶
func RuntimeSourceToTerraType(runtimeSource *workflowtemplates.RuntimeSource) (types.Object, diag.Diagnostics)
func VCSTriggersToAPIModel ¶
func VCSTriggersToAPIModel(ctx context.Context, m types.Object) (*workflowtemplates.VCSTriggers, 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.
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 ¶
func (m RuntimeSourceModel) ToAPIModel(ctx context.Context) (*workflowtemplates.RuntimeSource, diag.Diagnostics)
type VCSTriggersCreateRevisionModel ¶
func (VCSTriggersCreateRevisionModel) AttributeTypes ¶
func (VCSTriggersCreateRevisionModel) AttributeTypes() map[string]attr.Type
type VCSTriggersCreateTagModel ¶
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"`
Tags types.List `tfsdk:"tags"`
ContextTags types.Map `tfsdk:"context_tags"`
VCSTriggers types.Object `tfsdk:"vcs_triggers"`
}
func BuildAPIModelToWorkflowTemplateModel ¶
func BuildAPIModelToWorkflowTemplateModel(apiResponse *workflowtemplates.ReadWorkflowTemplateResponse) (*WorkflowTemplateResourceModel, diag.Diagnostics)
func (*WorkflowTemplateResourceModel) ToAPIModel ¶
func (m *WorkflowTemplateResourceModel) ToAPIModel(ctx context.Context) (*workflowtemplates.CreateWorkflowTemplateRequest, diag.Diagnostics)
func (*WorkflowTemplateResourceModel) ToUpdateAPIModel ¶
func (m *WorkflowTemplateResourceModel) ToUpdateAPIModel(ctx context.Context) (*workflowtemplates.UpdateWorkflowTemplateRequest, diag.Diagnostics)
Click to show internal directories.
Click to hide internal directories.