Documentation ¶
Index ¶
- type AppTFConfigInput
- type Infrastructure
- func (i *Infrastructure) AppECSCluster(ctx context.Context, tf *tfexec.Terraform) (string, error)
- func (i *Infrastructure) AppECSService(ctx context.Context, tf *tfexec.Terraform) (string, error)
- func (i *Infrastructure) AppTFConfig(input *AppTFConfigInput) (map[string]string, error)
- func (i *Infrastructure) ApplyDomain(ctx context.Context, tf *tfexec.Terraform) error
- func (i *Infrastructure) ApplyEnv(ctx context.Context, tf *tfexec.Terraform) error
- func (i *Infrastructure) CreateApplication(ctx context.Context, s *deployment.Spec, tf *tfexec.Terraform) error
- func (i *Infrastructure) CreateDomain(ctx context.Context, tf *tfexec.Terraform) ([]string, error)
- func (i *Infrastructure) CreateEnvironment(ctx context.Context, tf *tfexec.Terraform) error
- func (i *Infrastructure) DeleteDomain(ctx context.Context, tf *tfexec.Terraform) error
- func (i *Infrastructure) DestroyApplication(ctx context.Context, tf *tfexec.Terraform) error
- func (i *Infrastructure) DestroyEnvironment(ctx context.Context, tf *tfexec.Terraform) error
- func (i *Infrastructure) DomainTFConfig(d *domain.Domain) (map[string]string, error)
- func (i *Infrastructure) ECSService(ctx context.Context, service, cluster string) (types.Service, error)
- func (i *Infrastructure) ECSServicePrimaryDeployment(ctx context.Context, service, cluster string) (types.Deployment, error)
- func (i *Infrastructure) ECSServiceStatus(ctx context.Context, service, cluster string) (string, error)
- func (i *Infrastructure) EnvTFConfig(ctx context.Context, e *environment.Environment, dsf string) (map[string]string, error)
- func (i *Infrastructure) ModifyApplication(ctx context.Context, spec *deployment.Spec, tf *tfexec.Terraform) error
- func (i *Infrastructure) NewTerraform(workDir string, out io.Writer) (*tfexec.Terraform, error)
- func (i *Infrastructure) PlanDomain(ctx context.Context, tf *tfexec.Terraform) (bool, error)
- func (i *Infrastructure) PlanEnv(ctx context.Context, tf *tfexec.Terraform) (bool, error)
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 (*Infrastructure) AppECSService ¶ added in v0.0.2
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
ApplyDomain runs Terraform apply over the domains infra configuration
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
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 (*Infrastructure) DeleteDomain ¶ added in v0.0.2
DeleteDomain destroys the Terraform infrastructure of a domain
func (*Infrastructure) DestroyApplication ¶ added in v0.0.2
func (*Infrastructure) DestroyEnvironment ¶ added in v0.0.2
func (*Infrastructure) DomainTFConfig ¶ added in v0.0.3
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 (*Infrastructure) ECSServicePrimaryDeployment ¶
func (i *Infrastructure) ECSServicePrimaryDeployment(ctx context.Context, service, cluster string) (types.Deployment, error)
func (*Infrastructure) ECSServiceStatus ¶
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 (*Infrastructure) PlanDomain ¶ added in v0.0.4
PlanDomain runs Terraform plan over the domains infra configuration