Documentation
¶
Index ¶
- func NewResource() resource.Resource
- type ActionDependencyConditionModel
- type ActionDependencyModel
- type ActionOrderModel
- type ActionsModel
- type DeploymentPlatformConfigConfigModel
- type DeploymentPlatformConfigModel
- type EnvVarConfigModel
- type EnvironmentVariableModel
- type IacVcsConfigModel
- type MinistepsEmailModel
- type MinistepsModel
- type MinistepsNotificationRecipientsModel
- type MinistepsNotificationsModel
- type MinistepsWebhooksContainerModel
- type MinistepsWebhooksModel
- type MinistepsWfChainingContainerModel
- type MinistepsWorkflowChainingModel
- type MountPointModel
- type RunnerConstraintsModel
- type StackActionParametersModel
- type StackResourceModel
- type TerraformActionModel
- type TerraformConfigModel
- type VcsConfigModel
- type VcsIacInputDataModel
- type WfStepInputDataModel
- type WfStepsConfigModel
- type WfUserSchedulesModel
- type WorkflowInStackModel
- type WorkflowsConfigModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResource ¶
NewResource is a helper function to simplify the provider implementation.
Types ¶
type ActionDependencyConditionModel ¶
func (ActionDependencyConditionModel) AttributeTypes ¶
func (ActionDependencyConditionModel) AttributeTypes() map[string]attr.Type
type ActionDependencyModel ¶
type ActionDependencyModel struct {
Id types.String `tfsdk:"id"`
Condition types.Object `tfsdk:"condition"`
}
func (ActionDependencyModel) AttributeTypes ¶
func (ActionDependencyModel) AttributeTypes() map[string]attr.Type
type ActionOrderModel ¶
type ActionOrderModel struct {
Parameters types.Object `tfsdk:"parameters"`
Dependencies types.List `tfsdk:"dependencies"`
}
func (ActionOrderModel) AttributeTypes ¶
func (ActionOrderModel) AttributeTypes() map[string]attr.Type
type ActionsModel ¶
type ActionsModel struct {
Name types.String `tfsdk:"name"`
Description types.String `tfsdk:"description"`
// Default is the platform's template-vs-custom flag (true: comes from the
// stack template; false: the user's own). It is kept in state so every
// update can re-send it as stored: the provider re-sends the full actions
// map on each update, and stamping every action false made core treat
// template actions as custom on later upgrades done outside Terraform
// (kept instead of synced). Planned by actionDefaultModifier.
Default types.Bool `tfsdk:"default"`
Order types.Map `tfsdk:"order"`
}
ActionsModel represents a single action value in the actions map.
func (ActionsModel) AttributeTypes ¶
func (ActionsModel) AttributeTypes() map[string]attr.Type
type DeploymentPlatformConfigConfigModel ¶
type DeploymentPlatformConfigConfigModel struct {
IntegrationId types.String `tfsdk:"integration_id"`
ProfileName types.String `tfsdk:"profile_name"`
}
func (DeploymentPlatformConfigConfigModel) AttributeTypes ¶
func (DeploymentPlatformConfigConfigModel) AttributeTypes() map[string]attr.Type
type DeploymentPlatformConfigModel ¶
type DeploymentPlatformConfigModel struct {
Kind types.String `tfsdk:"kind"`
Config types.Object `tfsdk:"config"`
}
DeploymentPlatformConfigModel represents deployment platform configuration.
func (DeploymentPlatformConfigModel) AttributeTypes ¶
func (DeploymentPlatformConfigModel) AttributeTypes() map[string]attr.Type
type EnvVarConfigModel ¶
type EnvVarConfigModel struct {
VarName types.String `tfsdk:"var_name"`
SecretId types.String `tfsdk:"secret_id"`
TextValue types.String `tfsdk:"text_value"`
}
func (EnvVarConfigModel) AttributeTypes ¶
func (EnvVarConfigModel) AttributeTypes() map[string]attr.Type
type EnvironmentVariableModel ¶
type EnvironmentVariableModel struct {
Config types.Object `tfsdk:"config"`
Kind types.String `tfsdk:"kind"`
}
EnvironmentVariableModel represents a single environment variable configuration.
func (EnvironmentVariableModel) AttributeTypes ¶
func (EnvironmentVariableModel) AttributeTypes() map[string]attr.Type
type IacVcsConfigModel ¶
type IacVcsConfigModel struct {
UseMarketplaceTemplate types.Bool `tfsdk:"use_marketplace_template"`
IacTemplateId types.String `tfsdk:"iac_template_id"`
}
IacVcsConfigModel has no custom_source: stacks never use it (unlike stack_template_revision/workflow_from_template's copies of this shape).
func (IacVcsConfigModel) AttributeTypes ¶
func (IacVcsConfigModel) AttributeTypes() map[string]attr.Type
type MinistepsEmailModel ¶
type MinistepsEmailModel struct {
ApprovalRequired types.List `tfsdk:"approval_required"`
Cancelled types.List `tfsdk:"cancelled"`
Completed types.List `tfsdk:"completed"`
DriftDetected types.List `tfsdk:"drift_detected"`
Errored types.List `tfsdk:"errored"`
}
func (MinistepsEmailModel) AttributeTypes ¶
func (MinistepsEmailModel) AttributeTypes() map[string]attr.Type
type MinistepsModel ¶
type MinistepsModel struct {
Notifications types.Object `tfsdk:"notifications"`
Webhooks types.Object `tfsdk:"webhooks"`
WfChaining types.Object `tfsdk:"wf_chaining"`
}
func (MinistepsModel) AttributeTypes ¶
func (MinistepsModel) AttributeTypes() map[string]attr.Type
type MinistepsNotificationRecipientsModel ¶
func (MinistepsNotificationRecipientsModel) AttributeTypes ¶
func (MinistepsNotificationRecipientsModel) AttributeTypes() map[string]attr.Type
type MinistepsNotificationsModel ¶
func (MinistepsNotificationsModel) AttributeTypes ¶
func (MinistepsNotificationsModel) AttributeTypes() map[string]attr.Type
type MinistepsWebhooksContainerModel ¶
type MinistepsWebhooksContainerModel struct {
ApprovalRequired types.List `tfsdk:"approval_required"`
Cancelled types.List `tfsdk:"cancelled"`
Completed types.List `tfsdk:"completed"`
DriftDetected types.List `tfsdk:"drift_detected"`
Errored types.List `tfsdk:"errored"`
}
func (MinistepsWebhooksContainerModel) AttributeTypes ¶
func (MinistepsWebhooksContainerModel) AttributeTypes() map[string]attr.Type
type MinistepsWebhooksModel ¶
type MinistepsWebhooksModel struct {
WebhookName types.String `tfsdk:"webhook_name"`
WebhookUrl types.String `tfsdk:"webhook_url"`
WebhookSecret types.String `tfsdk:"webhook_secret"`
}
func (MinistepsWebhooksModel) AttributeTypes ¶
func (MinistepsWebhooksModel) AttributeTypes() map[string]attr.Type
type MinistepsWfChainingContainerModel ¶
type MinistepsWfChainingContainerModel struct {
Completed types.List `tfsdk:"completed"`
Errored types.List `tfsdk:"errored"`
}
func (MinistepsWfChainingContainerModel) AttributeTypes ¶
func (MinistepsWfChainingContainerModel) AttributeTypes() map[string]attr.Type
type MinistepsWorkflowChainingModel ¶
type MinistepsWorkflowChainingModel struct {
WorkflowGroupId types.String `tfsdk:"workflow_group_id"`
StackId types.String `tfsdk:"stack_id"`
StackRunPayload types.String `tfsdk:"stack_run_payload"`
WorkflowId types.String `tfsdk:"workflow_id"`
WorkflowRunPayload types.String `tfsdk:"workflow_run_payload"`
}
func (MinistepsWorkflowChainingModel) AttributeTypes ¶
func (MinistepsWorkflowChainingModel) AttributeTypes() map[string]attr.Type
type MountPointModel ¶
type MountPointModel struct {
Source types.String `tfsdk:"source"`
Target types.String `tfsdk:"target"`
ReadOnly types.Bool `tfsdk:"read_only"`
}
func (MountPointModel) AttributeTypes ¶
func (MountPointModel) AttributeTypes() map[string]attr.Type
type RunnerConstraintsModel ¶
type RunnerConstraintsModel struct {
Type types.String `tfsdk:"type"`
Names types.List `tfsdk:"names"`
}
func (RunnerConstraintsModel) AttributeTypes ¶
func (RunnerConstraintsModel) AttributeTypes() map[string]attr.Type
type StackActionParametersModel ¶
type StackActionParametersModel struct {
TerraformAction types.Object `tfsdk:"terraform_action"`
DeploymentPlatformConfig types.List `tfsdk:"deployment_platform_config"`
WfStepsConfig types.List `tfsdk:"wf_steps_config"`
EnvironmentVariables types.List `tfsdk:"environment_variables"`
}
func (StackActionParametersModel) AttributeTypes ¶
func (StackActionParametersModel) AttributeTypes() map[string]attr.Type
type StackResourceModel ¶
type StackResourceModel struct {
Id types.String `tfsdk:"id"`
WorkflowGroupId types.String `tfsdk:"workflow_group_id"`
ResourceName types.String `tfsdk:"resource_name"`
Description types.String `tfsdk:"description"`
Tags types.List `tfsdk:"tags"`
Actions types.Map `tfsdk:"actions"`
TemplateGroupId types.String `tfsdk:"template_group_id"`
WorkflowsConfig types.Object `tfsdk:"workflows_config"`
ContextTags types.Map `tfsdk:"context_tags"`
}
func BuildAPIModelToStackModel ¶
func BuildAPIModelToStackModel(ctx context.Context, apiResponse *sgsdkgo.StackData, workflowGroupId types.String) (*StackResourceModel, diag.Diagnostics)
BuildAPIModelToStackModel converts the API response into a StackResourceModel. workflowGroupId isn't part of the API response — the platform has no concept of "workflow group" on a stack response — so it must be threaded through from the caller's own plan/state rather than derived here. template_group_id is kept exactly as the API returns it ("/<owner-org>/<template-id>:<rev>"): config must use that same form (see ToAPIModel), and stripping the org would lose which organization owns a shared template.
func (*StackResourceModel) ToAPIModel ¶
func (m *StackResourceModel) ToAPIModel(ctx context.Context, tpl *stacktemplaterevisions.ReadStackTemplateRevisionModel, workflowTemplates map[string]*workflowtemplaterevisions.ReadWorkflowTemplateRevisionModel) (*sgsdkgo.Stack, diag.Diagnostics)
ToAPIModel converts the plan into a Create payload. template_group_id is sent exactly as written: it is required in the API's own fully qualified form ("/<owner-org>/<template-id>:<rev>", see validators.QualifiedTemplateRevisionId for why), so it may name a stack template owned by another organization. tpl is the stack template revision resolved from template_group_id (nil if unset) — description/tags/context_tags/actions fall back to the template's value when the user left the corresponding field unset. workflows_config has no template-based resolution yet.
func (*StackResourceModel) ToUpdateAPIModel ¶
func (m *StackResourceModel) ToUpdateAPIModel(ctx context.Context, tpl *stacktemplaterevisions.ReadStackTemplateRevisionModel, workflowTemplates map[string]*workflowtemplaterevisions.ReadWorkflowTemplateRevisionModel) (*sgsdkgo.PatchedStack, diag.Diagnostics)
ToUpdateAPIModel converts the plan into an Update payload. template_group_id is sent exactly as written — see ToAPIModel. tpl is the stack template revision resolved from template_group_id (nil if unset). For description/tags/actions/context_tags/workflows_config: a known, non-null plan value is always sent as-is; otherwise (unknown, or the rare literal-null plan value reResolveOnRevisionChange can produce) it falls back to the template's value when tpl has one. If neither the plan nor the template has a value, the corresponding apiModel field is left nil so the struct tag's omitempty drops it from the PATCH — the API leaves the field's existing value untouched. This code never sends sgsdkgo.Null: these attributes are Optional+Computed with UseStateForUnknown, so a plan value only becomes null via deliberate re-resolution, never real user intent (an HCL config can't distinguish "omitted" from "explicitly null" for these fields). Clearing one of these fields requires sending an explicit empty value ("", [], {}), which is a known non-null plan value and already takes the first branch below.
type TerraformActionModel ¶
func (TerraformActionModel) AttributeTypes ¶
func (TerraformActionModel) AttributeTypes() map[string]attr.Type
type TerraformConfigModel ¶
type TerraformConfigModel struct {
TerraformVersion types.String `tfsdk:"terraform_version"`
DriftCheck types.Bool `tfsdk:"drift_check"`
DriftCron types.String `tfsdk:"drift_cron"`
ManagedTerraformState types.Bool `tfsdk:"managed_terraform_state"`
ApprovalPreApply types.Bool `tfsdk:"approval_pre_apply"`
TerraformPlanOptions types.String `tfsdk:"terraform_plan_options"`
TerraformInitOptions types.String `tfsdk:"terraform_init_options"`
TerraformBinPath types.List `tfsdk:"terraform_bin_path"`
Timeout types.Int64 `tfsdk:"timeout"`
PostApplyWfStepsConfig types.List `tfsdk:"post_apply_wf_steps_config"`
PreApplyWfStepsConfig types.List `tfsdk:"pre_apply_wf_steps_config"`
PrePlanWfStepsConfig types.List `tfsdk:"pre_plan_wf_steps_config"`
PostPlanWfStepsConfig types.List `tfsdk:"post_plan_wf_steps_config"`
PreInitHooks types.List `tfsdk:"pre_init_hooks"`
PrePlanHooks types.List `tfsdk:"pre_plan_hooks"`
PostPlanHooks types.List `tfsdk:"post_plan_hooks"`
PreApplyHooks types.List `tfsdk:"pre_apply_hooks"`
PostApplyHooks types.List `tfsdk:"post_apply_hooks"`
RunPreInitHooksOnDrift types.Bool `tfsdk:"run_pre_init_hooks_on_drift"`
}
func (TerraformConfigModel) AttributeTypes ¶
func (TerraformConfigModel) AttributeTypes() map[string]attr.Type
type VcsConfigModel ¶
type VcsConfigModel struct {
IacVcsConfig types.Object `tfsdk:"iac_vcs_config"`
IacInputData types.Object `tfsdk:"iac_input_data"`
}
func (VcsConfigModel) AttributeTypes ¶
func (VcsConfigModel) AttributeTypes() map[string]attr.Type
type VcsIacInputDataModel ¶
type VcsIacInputDataModel struct {
SchemaId types.String `tfsdk:"schema_id"`
SchemaType types.String `tfsdk:"schema_type"`
Data types.String `tfsdk:"data"`
}
VcsIacInputDataModel is vcs_config.iac_input_data, corresponding to the SDK's sgsdkgo.IacInputData (schema_id + schema_type + data).
func (VcsIacInputDataModel) AttributeTypes ¶
func (VcsIacInputDataModel) AttributeTypes() map[string]attr.Type
type WfStepInputDataModel ¶
type WfStepInputDataModel struct {
SchemaType types.String `tfsdk:"schema_type"`
Data types.String `tfsdk:"data"`
}
func (WfStepInputDataModel) AttributeTypes ¶
func (WfStepInputDataModel) AttributeTypes() map[string]attr.Type
type WfStepsConfigModel ¶
type WfStepsConfigModel struct {
Name types.String `tfsdk:"name"`
EnvironmentVariables types.List `tfsdk:"environment_variables"`
Approval types.Bool `tfsdk:"approval"`
Timeout types.Int64 `tfsdk:"timeout"`
CmdOverride types.String `tfsdk:"cmd_override"`
MountPoints types.List `tfsdk:"mount_points"`
WfStepTemplateId types.String `tfsdk:"wf_step_template_id"`
WfStepInputData types.Object `tfsdk:"wf_step_input_data"`
}
func (WfStepsConfigModel) AttributeTypes ¶
func (WfStepsConfigModel) AttributeTypes() map[string]attr.Type
type WfUserSchedulesModel ¶
type WfUserSchedulesModel struct {
Name types.String `tfsdk:"name"`
Desc types.String `tfsdk:"desc"`
Cron types.String `tfsdk:"cron"`
State types.String `tfsdk:"state"`
}
WfUserSchedulesModel represents a per-workflow user schedule (sgsdkgo.UserSchedules), which has no Inputs field.
func (WfUserSchedulesModel) AttributeTypes ¶
func (WfUserSchedulesModel) AttributeTypes() map[string]attr.Type
type WorkflowInStackModel ¶
type WorkflowInStackModel struct {
Id types.String `tfsdk:"id"`
WorkflowId types.String `tfsdk:"workflow_id"`
ResourceName types.String `tfsdk:"resource_name"`
Description types.String `tfsdk:"description"`
Tags types.List `tfsdk:"tags"`
WfType types.String `tfsdk:"wf_type"`
ParallelExecution types.String `tfsdk:"parallel_execution"`
WfStepsConfig types.List `tfsdk:"wf_steps_config"`
TerraformConfig types.Object `tfsdk:"terraform_config"`
EnvironmentVariables types.List `tfsdk:"environment_variables"`
DeploymentPlatformConfig types.List `tfsdk:"deployment_platform_config"`
VcsConfig types.Object `tfsdk:"vcs_config"`
Approvers types.List `tfsdk:"approvers"`
NumberOfApprovalsRequired types.Int64 `tfsdk:"number_of_approvals_required"`
UserJobCpu types.Int64 `tfsdk:"user_job_cpu"`
UserJobMemory types.Int64 `tfsdk:"user_job_memory"`
UserSchedules types.List `tfsdk:"user_schedules"`
MiniSteps types.Object `tfsdk:"mini_steps"`
ContextTags types.Map `tfsdk:"context_tags"`
RunnerConstraints types.Object `tfsdk:"runner_constraints"`
}
WorkflowInStackModel corresponds to sgsdkgo.StackWorkflowsConfigWorkflow.
func (WorkflowInStackModel) AttributeTypes ¶
func (WorkflowInStackModel) AttributeTypes() map[string]attr.Type
type WorkflowsConfigModel ¶
func (WorkflowsConfigModel) AttributeTypes ¶
func (WorkflowsConfigModel) AttributeTypes() map[string]attr.Type