deployment

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const LookupPrefix = "modm."

Variables

This section is empty.

Functions

func DeleteResourceGroup

func DeleteResourceGroup(ctx context.Context, subscriptionId string, resourceGroupName string) error

func DryRun

func DryRun(ctx context.Context, azureDeployment *AzureDeployment) ([]*sdk.DryRunResult, error)

func FindResourcesByType

func FindResourcesByType(template Template, resourceType string) []string

Types

type ArmTemplateDeployer

type ArmTemplateDeployer struct {
	// contains filtered or unexported fields
}

func (*ArmTemplateDeployer) Deploy

func (*ArmTemplateDeployer) Redeploy added in v0.2.1

type AzureDeployment

type AzureDeployment struct {
	SubscriptionId    string         `json:"subscriptionId"`
	Location          string         `json:"location"`
	ResourceGroupName string         `json:"resourceGroupName"`
	DeploymentName    string         `json:"deploymentName"`
	DeploymentType    DeploymentType `json:"deploymentType"`
	Template          Template       `json:"template"`
	Params            TemplateParams `json:"templateParams"`
	ResumeToken       string         `json:"resumeToken"`
}

func (*AzureDeployment) GetDeploymentType

func (ad *AzureDeployment) GetDeploymentType() DeploymentType

func (AzureDeployment) GetParams added in v1.0.1

func (ad AzureDeployment) GetParams() map[string]interface{}

func (AzureDeployment) GetTemplateParams

func (ad AzureDeployment) GetTemplateParams() map[string]interface{}

type AzureDeploymentResult

type AzureDeploymentResult struct {
	ID                string                 `json:"id"`
	CorrelationID     string                 `json:"correlationId"`
	Duration          string                 `json:"duration"`
	Timestamp         time.Time              `json:"timestamp"`
	ProvisioningState string                 `json:"provisioningState"`
	Outputs           map[string]interface{} `json:"outputs"`
	Status            ExecutionStatus
}

func Redeploy added in v0.2.1

type AzureRedeployment added in v0.2.1

type AzureRedeployment struct {
	SubscriptionId    string `json:"subscriptionId"`
	Location          string `json:"location"`
	ResourceGroupName string `json:"resourceGroupName"`
	DeploymentName    string `json:"deploymentName"`
}

type CreateDeployment added in v0.2.2

type CreateDeployment func(ctx context.Context, dep AzureDeployment) (*AzureDeploymentResult, error)

create deployment function

type Deployer

type Deployer interface {
	Deploy(ctx context.Context, d *AzureDeployment) (*AzureDeploymentResult, error)
	Redeploy(ctx context.Context, d *AzureRedeployment) (*AzureDeploymentResult, error)
}

func CreateNewDeployer

func CreateNewDeployer(deploymentType DeploymentType) Deployer

type DeploymentType

type DeploymentType int64
const (
	AzureResourceManager DeploymentType = iota
	Terraform
)

type DryRunValidationInput

type DryRunValidationInput struct {
	// contains filtered or unexported fields
}

func (DryRunValidationInput) GetParams added in v1.0.1

func (i DryRunValidationInput) GetParams() map[string]interface{}

func (DryRunValidationInput) GetTemplateParams added in v1.0.1

func (i DryRunValidationInput) GetTemplateParams() map[string]interface{}

type DryRunValidator

type DryRunValidator interface {
	Validate(input DryRunValidationInput) (*sdk.DryRunResult, error)
}

type ExecutionStatus

type ExecutionStatus string
const (
	Started           ExecutionStatus = "Started"
	Failed            ExecutionStatus = "Failed"
	PermanentlyFailed ExecutionStatus = "PermanentlyFailed"
	Succeeded         ExecutionStatus = "Succeeded"
	Restart           ExecutionStatus = "Restart"
	Restarted         ExecutionStatus = "Restarted"
	RestartTimedOut   ExecutionStatus = "RestartTimedOut"
	Canceled          ExecutionStatus = "Canceled"
)

type LookupTagKey

type LookupTagKey string
const (

	// The unique id for modm to identify something
	LookupTagKeyId LookupTagKey = "modm.id"

	// whether or not to send events, if this is not set to true, then the event will not be sent
	LookupTagKeyEvents LookupTagKey = "modm.events"

	// the friendly name of the resource used for logging
	LookupTagKeyName LookupTagKey = "modm.name"

	// the stage id reference. Use is on a resource that's a child of a 1-level parent deployment
	LookupTagKeyStageId LookupTagKey = "modm.stage.id"

	// the stage id reference. Use is on a resource that's a child of a 1-level parent deployment
	LookupTagKeyRetry LookupTagKey = "modm.retry"
)

type LookupTags

type LookupTags map[LookupTagKey]*string

type Template

type Template map[string]interface{}

type TemplateParams

type TemplateParams map[string]interface{}

type ValidatorFunc added in v1.0.0

type ValidatorFunc func(input DryRunValidationInput) (*sdk.DryRunResult, error)

func (ValidatorFunc) Validate added in v1.0.0

Jump to

Keyboard shortcuts

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