cloudsync

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MPL-2.0 Imports: 43 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cloudsync provides helper functions for cloud sync operations.

Index

Constants

View Source
const (
	// ProvisionerTerraform indicates that a plan was created by Terraform.
	ProvisionerTerraform = "terraform"

	// ProvisionerOpenTofu indicates that a plan was created by OpenTofu.
	ProvisionerOpenTofu = "opentofu"
)

Variables

This section is empty.

Functions

func AfterRun

func AfterRun(e *engine.Engine, run engine.StackCloudRun, state *CloudRunState, res engine.RunResult, err error)

AfterRun is called after a cloud run.

func BeforeRun

func BeforeRun(e *engine.Engine, run engine.StackCloudRun, state *CloudRunState)

BeforeRun is called before a cloud run.

func CreateCloudDeployment

func CreateCloudDeployment(e *engine.Engine, wd string, deployRuns []engine.StackCloudRun, state *CloudRunState) error

CreateCloudDeployment creates a cloud deployment for the given runs.

func CreateCloudPreview

func CreateCloudPreview(e *engine.Engine, gitfilter engine.GitFilter, runs []engine.StackCloudRun, target, fromTarget string, state *CloudRunState) map[string]string

CreateCloudPreview creates a cloud preview for the given runs.

func DetectCloudMetadata

func DetectCloudMetadata(e *engine.Engine, state *CloudRunState)

DetectCloudMetadata detects the cloud metadata for the current run.

func Logs

func Logs(logger *zerolog.Logger, e *engine.Engine, run engine.StackRun, task engine.StackRunTask, state *CloudRunState, logs resources.CommandLogs)

Logs synchronizes the logs of a command with the Terramate Cloud.

Types

type CloudRunState

type CloudRunState struct {
	sync.RWMutex

	RunUUID resources.UUID

	ReviewRequest *resources.ReviewRequest
	RREvent       struct {
		PushedAt  *int64
		CommitSHA string
	}
	Metadata *resources.DeploymentMetadata
	// contains filtered or unexported fields
}

CloudRunState represents the state of the current run.

func (*CloudRunState) CloudDriftUUID added in v0.15.0

func (rs *CloudRunState) CloudDriftUUID(metaID string) (resources.UUID, bool)

CloudDriftUUID returns the cloud drift UUID of a stack given its metadata ID.

func (*CloudRunState) CloudPreviewID

func (rs *CloudRunState) CloudPreviewID(metaID string) (string, bool)

CloudPreviewID returns the cloud preview ID of a stack given its metadata ID.

func (*CloudRunState) SetMeta2CloudID

func (rs *CloudRunState) SetMeta2CloudID(metaID string, id int64)

SetMeta2CloudID sets the cloud ID of a stack given its metadata ID.

func (*CloudRunState) SetMeta2DriftUUID added in v0.15.0

func (rs *CloudRunState) SetMeta2DriftUUID(metaID string, driftUUID resources.UUID)

SetMeta2DriftUUID sets the cloud drift UUID of a stack given its metadata ID.

func (*CloudRunState) SetMeta2PreviewID

func (rs *CloudRunState) SetMeta2PreviewID(metaID string, previewID string)

SetMeta2PreviewID sets the cloud preview ID of a stack given its metadata ID.

func (*CloudRunState) StackCloudID

func (rs *CloudRunState) StackCloudID(metaID string) (int64, bool)

StackCloudID returns the cloud ID of a stack given its metadata ID.

Jump to

Keyboard shortcuts

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