Documentation
¶
Index ¶
- func NewResource() resource.Resource
- func RuntimeSourceConfigSchemaAttributes() map[string]schema.Attribute
- func RuntimeSourceConfigToTerraType(config *workflowsteptemplate.WorkflowStepRuntimeSourceConfig) (types.Object, diag.Diagnostics)
- func RuntimeSourceToTerraType(runtimeSource *workflowsteptemplate.WorkflowStepRuntimeSource) (types.Object, diag.Diagnostics)
- type RuntimeSourceConfigModel
- type RuntimeSourceModel
- type WorkflowStepTemplateResourceModel
- func (m *WorkflowStepTemplateResourceModel) ToAPIModel(ctx context.Context) (*workflowsteptemplate.CreateWorkflowStepTemplate, diag.Diagnostics)
- func (m *WorkflowStepTemplateResourceModel) ToPatchedAPIModel(ctx context.Context) (*workflowsteptemplate.UpdateWorkflowStepTemplateRequestModel, diag.Diagnostics)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResource ¶
NewResource is a helper function to simplify the provider implementation.
func RuntimeSourceConfigSchemaAttributes ¶
RuntimeSourceConfigSchemaAttributes returns the common schema attributes for runtime_source.config shared between workflow_step_template and workflow_step_template_revision resources.
func RuntimeSourceConfigToTerraType ¶
func RuntimeSourceConfigToTerraType(config *workflowsteptemplate.WorkflowStepRuntimeSourceConfig) (types.Object, diag.Diagnostics)
RuntimeSourceConfigToTerraType converts the SDK config to a Terraform object
func RuntimeSourceToTerraType ¶
func RuntimeSourceToTerraType(runtimeSource *workflowsteptemplate.WorkflowStepRuntimeSource) (types.Object, diag.Diagnostics)
RuntimeSourceToTerraType converts the SDK runtime source to a Terraform object
Types ¶
type RuntimeSourceConfigModel ¶
type RuntimeSourceConfigModel struct {
IsPrivate types.Bool `tfsdk:"is_private"`
Auth types.String `tfsdk:"auth"`
DockerImage types.String `tfsdk:"docker_image"`
DockerRegistryUsername types.String `tfsdk:"docker_registry_username"`
LocalWorkspaceDir types.String `tfsdk:"local_workspace_dir"`
}
RuntimeSourceConfigModel represents the config nested within runtime source
func (RuntimeSourceConfigModel) AttributeTypes ¶
func (RuntimeSourceConfigModel) AttributeTypes() map[string]attr.Type
func (*RuntimeSourceConfigModel) ToAPIModel ¶
func (m *RuntimeSourceConfigModel) ToAPIModel() *workflowsteptemplate.WorkflowStepRuntimeSourceConfig
ToAPIModel converts the RuntimeSourceConfigModel to the SDK config model
type RuntimeSourceModel ¶
type RuntimeSourceModel struct {
SourceConfigDestKind types.String `tfsdk:"source_config_dest_kind"`
Config types.Object `tfsdk:"config"`
AdditionalConfig types.Map `tfsdk:"additional_config"`
}
RuntimeSourceModel represents the runtime source nested object
func (RuntimeSourceModel) AttributeTypes ¶
func (RuntimeSourceModel) AttributeTypes() map[string]attr.Type
func (*RuntimeSourceModel) ToAPIModel ¶
func (m *RuntimeSourceModel) ToAPIModel(ctx context.Context) (*workflowsteptemplate.WorkflowStepRuntimeSource, diag.Diagnostics)
ToAPIModel converts the RuntimeSourceModel to the SDK runtime source model
type WorkflowStepTemplateResourceModel ¶
type WorkflowStepTemplateResourceModel struct {
Id types.String `tfsdk:"id"`
TemplateName types.String `tfsdk:"template_name"`
TemplateType types.String `tfsdk:"template_type"`
IsActive types.String `tfsdk:"is_active"`
IsPublic types.String `tfsdk:"is_public"`
Description types.String `tfsdk:"description"`
Tags types.List `tfsdk:"tags"`
ContextTags types.Map `tfsdk:"context_tags"`
RuntimeSource types.Object `tfsdk:"runtime_source"`
SourceConfigKind types.String `tfsdk:"source_config_kind"`
LatestRevision types.Int32 `tfsdk:"latest_revision"`
NextRevision types.Int32 `tfsdk:"next_revision"`
}
WorkflowStepTemplateResourceModel represents the Terraform resource model
func BuildAPIModelToWorkflowStepTemplateModel ¶
func BuildAPIModelToWorkflowStepTemplateModel(apiResponse *workflowsteptemplate.UpdateWorkflowStepTemplateResponse) (*WorkflowStepTemplateResourceModel, diag.Diagnostics)
BuildAPIModelToWorkflowStepTemplateModel converts the SDK response to the Terraform model
func (*WorkflowStepTemplateResourceModel) ToAPIModel ¶
func (m *WorkflowStepTemplateResourceModel) ToAPIModel(ctx context.Context) (*workflowsteptemplate.CreateWorkflowStepTemplate, diag.Diagnostics)
ToAPIModel converts the Terraform model to the SDK create request model
func (*WorkflowStepTemplateResourceModel) ToPatchedAPIModel ¶
func (m *WorkflowStepTemplateResourceModel) ToPatchedAPIModel(ctx context.Context) (*workflowsteptemplate.UpdateWorkflowStepTemplateRequestModel, diag.Diagnostics)
ToUpdateAPIModel converts the Terraform model to the SDK update request model