Documentation ¶
Overview ¶
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Copyright Jetstack Ltd. See LICENSE for details.
Index ¶
- Constants
- func Init(in *input.Input, provider *tarmakv1alpha1.Provider) error
- type AWSSGRule
- type Amazon
- func (a *Amazon) AskEnvironmentLocation(init interfaces.Initialize) (location string, err error)
- func (a *Amazon) AskInstancePoolZones(init interfaces.Initialize) (zones []string, err error)
- func (a *Amazon) AvailabilityZones() (availabiltyZones []string)
- func (a *Amazon) Cloud() string
- func (a *Amazon) DefaultImage(version string) (*tarmakv1alpha1.Image, error)
- func (a *Amazon) DynamoDB() (DynamoDB, error)
- func (a *Amazon) EC2() (EC2, error)
- func (a *Amazon) EnsureRemoteResources() error
- func (a *Amazon) Environment() ([]string, error)
- func (a *Amazon) InstanceType(typeIn string) (typeOut string, err error)
- func (a *Amazon) KMS() (KMS, error)
- func (a *Amazon) KeyName() string
- func (a *Amazon) LegacyPuppetTFName() string
- func (a *Amazon) ListHosts(c interfaces.Cluster) ([]interfaces.Host, error)
- func (a *Amazon) ListRegions() (regions []string, err error)
- func (a *Amazon) Name() string
- func (a *Amazon) Parameters() map[string]string
- func (a *Amazon) PublicZone() string
- func (a *Amazon) QueryImages(tags map[string]string) (images []*tarmakv1alpha1.Image, err error)
- func (a *Amazon) Region() string
- func (a *Amazon) RemoteState(namespace string, clusterName string, stackName string) string
- func (a *Amazon) RemoteStateAvailable(bucketName string) (bool, error)
- func (a *Amazon) RemoteStateBucketAvailable() (bool, error)
- func (a *Amazon) RemoteStateBucketName() string
- func (a *Amazon) RemoteStateKMSName() string
- func (a *Amazon) RemoteStateName() string
- func (a *Amazon) RemoteStateObjectKey(namespace string, clusterName string) string
- func (a *Amazon) Remove() error
- func (a *Amazon) Reset()
- func (a *Amazon) Route53() (Route53, error)
- func (a *Amazon) S3() (S3, error)
- func (a *Amazon) SecretsKMSName() string
- func (a *Amazon) Session() (*session.Session, error)
- func (a *Amazon) String() string
- func (a *Amazon) UploadConfiguration(cluster interfaces.Cluster, stateFile io.ReadSeeker, md5Hash string) error
- func (a *Amazon) Validate() error
- func (a *Amazon) Variables() map[string]interface{}
- func (a *Amazon) VaultKV() (kv.Service, error)
- func (a *Amazon) VaultKVWithParams(kmsKeyID, unsealKeyName string) (kv.Service, error)
- func (a *Amazon) Verify() error
- func (a *Amazon) VerifyAWSCredentials() error
- func (a *Amazon) VolumeType(typeIn string) (typeOut string, err error)
- type DynamoDB
- type EC2
- type KMS
- type Route53
- type S3
Constants ¶
const DynamoDBKey = "LockID"
const EOF = "==EOF"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AWSSGRule ¶
type Amazon ¶
type Amazon struct {
// contains filtered or unexported fields
}
func NewFromConfig ¶
func NewFromConfig(tarmak interfaces.Tarmak, conf *tarmakv1alpha1.Provider) (*Amazon, error)
func (*Amazon) AskEnvironmentLocation ¶
func (a *Amazon) AskEnvironmentLocation(init interfaces.Initialize) (location string, err error)
func (*Amazon) AskInstancePoolZones ¶
func (a *Amazon) AskInstancePoolZones(init interfaces.Initialize) (zones []string, err error)
func (*Amazon) AvailabilityZones ¶
This return the availabililty zones that are used for a cluster
func (*Amazon) DefaultImage ¶
func (a *Amazon) DefaultImage(version string) (*tarmakv1alpha1.Image, error)
func (*Amazon) EnsureRemoteResources ¶
func (*Amazon) Environment ¶
This will return necessary environment variables
func (*Amazon) InstanceType ¶
This methods converts and possibly validates a generic instance type to a provider specifc
func (*Amazon) LegacyPuppetTFName ¶
func (*Amazon) ListHosts ¶
func (a *Amazon) ListHosts(c interfaces.Cluster) ([]interfaces.Host, error)
func (*Amazon) ListRegions ¶
func (*Amazon) Parameters ¶
This parameters should include non sensitive information to identify a provider
func (*Amazon) PublicZone ¶
func (*Amazon) QueryImages ¶
func (*Amazon) RemoteState ¶
func (*Amazon) RemoteStateAvailable ¶
func (*Amazon) RemoteStateBucketAvailable ¶
func (*Amazon) RemoteStateBucketName ¶
TODO: remove me, deprecated
func (*Amazon) RemoteStateKMSName ¶
func (*Amazon) RemoteStateName ¶
func (*Amazon) RemoteStateObjectKey ¶
func (*Amazon) SecretsKMSName ¶
func (*Amazon) UploadConfiguration ¶
func (a *Amazon) UploadConfiguration(cluster interfaces.Cluster, stateFile io.ReadSeeker, md5Hash string) error
This uploads the main configuration to the S3 bucket
func (*Amazon) VaultKVWithParams ¶
func (*Amazon) VerifyAWSCredentials ¶
Check if AWS credentials are setup correctly. AWS GO SDK doesn't have an default check if access is successfull. We check if we can query the region without errors
type DynamoDB ¶
type DynamoDB interface { GetItem(input *dynamodb.GetItemInput) (*dynamodb.GetItemOutput, error) DescribeTable(input *dynamodb.DescribeTableInput) (*dynamodb.DescribeTableOutput, error) CreateTable(input *dynamodb.CreateTableInput) (*dynamodb.CreateTableOutput, error) DeleteTable(input *dynamodb.DeleteTableInput) (*dynamodb.DeleteTableOutput, error) DeleteItem(input *dynamodb.DeleteItemInput) (*dynamodb.DeleteItemOutput, error) Scan(input *dynamodb.ScanInput) (*dynamodb.ScanOutput, error) }
type EC2 ¶
type EC2 interface { DescribeInstances(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) ImportKeyPair(input *ec2.ImportKeyPairInput) (*ec2.ImportKeyPairOutput, error) DescribeKeyPairs(input *ec2.DescribeKeyPairsInput) (*ec2.DescribeKeyPairsOutput, error) DescribeAvailabilityZones(input *ec2.DescribeAvailabilityZonesInput) (*ec2.DescribeAvailabilityZonesOutput, error) DescribeRegions(input *ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error) DescribeReservedInstancesOfferings(input *ec2.DescribeReservedInstancesOfferingsInput) (*ec2.DescribeReservedInstancesOfferingsOutput, error) DescribeImages(input *ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error) }
type KMS ¶
type KMS interface { CreateAlias(input *kms.CreateAliasInput) (*kms.CreateAliasOutput, error) CreateKey(input *kms.CreateKeyInput) (*kms.CreateKeyOutput, error) DescribeKey(input *kms.DescribeKeyInput) (*kms.DescribeKeyOutput, error) }
type Route53 ¶
type Route53 interface { CreateHostedZone(input *route53.CreateHostedZoneInput) (*route53.CreateHostedZoneOutput, error) GetHostedZone(input *route53.GetHostedZoneInput) (*route53.GetHostedZoneOutput, error) ListHostedZonesByName(input *route53.ListHostedZonesByNameInput) (*route53.ListHostedZonesByNameOutput, error) }
type S3 ¶
type S3 interface { HeadBucket(input *s3.HeadBucketInput) (*s3.HeadBucketOutput, error) CreateBucket(input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error) DeleteBucket(input *s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error) GetBucketVersioning(input *s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error) GetBucketLocation(input *s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error) GetBucketEncryption(input *s3.GetBucketEncryptionInput) (*s3.GetBucketEncryptionOutput, error) PutBucketVersioning(input *s3.PutBucketVersioningInput) (*s3.PutBucketVersioningOutput, error) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error) PutBucketEncryption(input *s3.PutBucketEncryptionInput) (*s3.PutBucketEncryptionOutput, error) GetObject(input *s3.GetObjectInput) (*s3.GetObjectOutput, error) DeleteObject(input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error) ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error) ListObjectVersions(input *s3.ListObjectVersionsInput) (*s3.ListObjectVersionsOutput, error) DeleteObjects(input *s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error) }