internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAWSPlugin

func NewAWSPlugin() schema.MachComposerPlugin

func StripProtocol

func StripProtocol(value string) string

func TerraformRenderComponentProviders

func TerraformRenderComponentProviders(cfg *SiteConfig) []string

func ZoneFromURL

func ZoneFromURL(value string) string

Types

type AWSProvider

type AWSProvider struct {
	Name        string
	Region      string
	DefaultTags map[string]string `mapstructure:"default_tags"`
}

type AWSTFState

type AWSTFState struct {
	Bucket    string `mapstructure:"bucket"`
	KeyPrefix string `mapstructure:"key_prefix"`
	Region    string `mapstructure:"region"`
	RoleARN   string `mapstructure:"role_arn"`
	LockTable string `mapstructure:"lock_table"`
	Encrypt   bool   `mapstructure:"encrypt" default:"true"`
}

AWSTFState AWS S3 bucket state backend configuration.

type ComponentConfig

type ComponentConfig struct {
	Endpoints map[string]string
}

type EndpointConfig

type EndpointConfig struct {
	// Key is the id of the endpoint (.e.g internal)
	Key string `mapstructure:"key"`

	URL                  string `mapstructure:"url"`
	ThrottlingBurstLimit *int   `mapstructure:"throttling_burst_limit"`
	ThrottlingRateLimit  *int   `mapstructure:"throttling_rate_limit"`
	EnableCDN            bool   `mapstructure:"enable_cdn"`

	AssociatedComponents []string `mapstructure:"-"`

	// Zone is the route53 DNS Zone
	Zone string `mapstructure:"zone"`
}

func (*EndpointConfig) SetDefaults

func (e *EndpointConfig) SetDefaults()

type Plugin added in v0.0.3

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

func (*Plugin) Configure added in v0.0.3

func (p *Plugin) Configure(environment string, provider string) error

func (*Plugin) GetValidationSchema added in v0.0.3

func (p *Plugin) GetValidationSchema() (*schema.ValidationSchema, error)

func (*Plugin) Identifier added in v0.0.3

func (p *Plugin) Identifier() string

func (*Plugin) IsEnabled added in v0.0.3

func (p *Plugin) IsEnabled() bool

func (*Plugin) RenderTerraformComponent added in v0.0.3

func (p *Plugin) RenderTerraformComponent(site string, component string) (*schema.ComponentSchema, error)

func (*Plugin) SetComponentEndpointsConfig added in v0.0.3

func (p *Plugin) SetComponentEndpointsConfig(component string, endpoints map[string]string) error

func (*Plugin) SetRemoteStateBackend added in v0.0.3

func (p *Plugin) SetRemoteStateBackend(data map[string]any) error

func (*Plugin) SetSiteConfig added in v0.0.3

func (p *Plugin) SetSiteConfig(site string, data map[string]any) error

func (*Plugin) SetSiteEndpointConfig added in v0.0.4

func (p *Plugin) SetSiteEndpointConfig(site string, name string, data map[string]any) error

func (*Plugin) TerraformRenderProviders added in v0.0.3

func (p *Plugin) TerraformRenderProviders(site string) (string, error)

func (*Plugin) TerraformRenderResources added in v0.0.3

func (p *Plugin) TerraformRenderResources(site string) (string, error)

func (*Plugin) TerraformRenderStateBackend added in v0.0.3

func (p *Plugin) TerraformRenderStateBackend(site string) (string, error)

type SiteConfig

type SiteConfig struct {
	AccountID string `mapstructure:"account_id"`
	Region    string `mapstructure:"region"`

	DeployRoleName string            `mapstructure:"deploy_role_name"`
	ExtraProviders []AWSProvider     `mapstructure:"extra_providers"`
	DefaultTags    map[string]string `mapstructure:"default_tags"`
}

Jump to

Keyboard shortcuts

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