infrastructure

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppTFConfigInput added in v0.0.3

type AppTFConfigInput struct {
	// Deployment specification of the application
	Spec *deployment.Spec

	// Target environment
	Env *environment.Environment

	// If target environment has domain enabled, the exact path on the system
	// of the file containing the domain's TF state.
	DomainTFStateFile string

	// The exact path on the system of the file containing the environment's
	// TF state.
	EnvTFStateFile string
}

A set of Objects supplied to the AppTFConfig method

type Infrastructure

type Infrastructure struct {
	Log      *logrus.Logger
	Region   string
	Ec2      *ec2.Client
	Ecs      *ecs.Client
	TFBinary string
}

Interacts with AWS and Terraform to provision and manage infrastructure resources.

func (*Infrastructure) AppECSCluster added in v0.0.2

func (i *Infrastructure) AppECSCluster(ctx context.Context, tf *tfexec.Terraform) (string, error)

func (*Infrastructure) AppECSService added in v0.0.2

func (i *Infrastructure) AppECSService(ctx context.Context, tf *tfexec.Terraform) (string, error)

func (*Infrastructure) AppTFConfig added in v0.0.3

func (i *Infrastructure) AppTFConfig(input *AppTFConfigInput) (map[string]string, error)

func (*Infrastructure) ApplyDomain added in v0.0.4

func (i *Infrastructure) ApplyDomain(ctx context.Context, tf *tfexec.Terraform) error

ApplyDomain runs Terraform apply over the domains infra configuration

func (*Infrastructure) ApplyEnv added in v0.0.4

func (i *Infrastructure) ApplyEnv(ctx context.Context, tf *tfexec.Terraform) error

func (*Infrastructure) CreateApplication added in v0.0.2

func (i *Infrastructure) CreateApplication(ctx context.Context, s *deployment.Spec, tf *tfexec.Terraform) error

func (*Infrastructure) CreateDomain added in v0.0.2

func (i *Infrastructure) CreateDomain(ctx context.Context, tf *tfexec.Terraform) ([]string, error)

CreateDomain creates infrastructure for a domain. It returns the Name Server records of the DNS hosted zone.

func (*Infrastructure) CreateEnvironment added in v0.0.2

func (i *Infrastructure) CreateEnvironment(ctx context.Context, tf *tfexec.Terraform) error

func (*Infrastructure) DeleteDomain added in v0.0.2

func (i *Infrastructure) DeleteDomain(ctx context.Context, tf *tfexec.Terraform) error

DeleteDomain destroys the Terraform infrastructure of a domain

func (*Infrastructure) DestroyApplication added in v0.0.2

func (i *Infrastructure) DestroyApplication(ctx context.Context, tf *tfexec.Terraform) error

func (*Infrastructure) DestroyEnvironment added in v0.0.2

func (i *Infrastructure) DestroyEnvironment(ctx context.Context, tf *tfexec.Terraform) error

func (*Infrastructure) DomainTFConfig added in v0.0.3

func (i *Infrastructure) DomainTFConfig(d *domain.Domain) (map[string]string, error)

DomainTFConfig returns a map. The keys are names of terraform config files needed for the domain infrastructure. The values are their corresponding TF code. This method generates the TF configuration depending on the components being used for the domain.

func (*Infrastructure) ECSService

func (i *Infrastructure) ECSService(ctx context.Context, service, cluster string) (types.Service, error)

func (*Infrastructure) ECSServicePrimaryDeployment

func (i *Infrastructure) ECSServicePrimaryDeployment(ctx context.Context, service, cluster string) (types.Deployment, error)

func (*Infrastructure) ECSServiceStatus

func (i *Infrastructure) ECSServiceStatus(ctx context.Context, service, cluster string) (string, error)

func (*Infrastructure) EnvTFConfig added in v0.0.3

func (i *Infrastructure) EnvTFConfig(
	ctx context.Context, e *environment.Environment, dsf string,
) (map[string]string, error)

func (*Infrastructure) ModifyApplication added in v0.0.2

func (i *Infrastructure) ModifyApplication(
	ctx context.Context, spec *deployment.Spec, tf *tfexec.Terraform,
) error

func (*Infrastructure) NewTerraform added in v0.0.2

func (i *Infrastructure) NewTerraform(workDir string, out io.Writer) (*tfexec.Terraform, error)

func (*Infrastructure) PlanDomain added in v0.0.4

func (i *Infrastructure) PlanDomain(ctx context.Context, tf *tfexec.Terraform) (bool, error)

PlanDomain runs Terraform plan over the domains infra configuration

func (*Infrastructure) PlanEnv added in v0.0.4

func (i *Infrastructure) PlanEnv(ctx context.Context, tf *tfexec.Terraform) (bool, error)

Jump to

Keyboard shortcuts

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