aws

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package aws implements autowiring for the osb-aws-provider (Atlassian specific)

This provider is just the old resource-provisioning service with an OSB interface slapped on. It therefore provides a number of different services/plans, but all work in the same way, accepting a format based on the original format RPS requires, which includes a 'ServiceEnvironment' field for location level variables and service specific globals (e.g. vpc, subnets, pagerduty...). However, the schemas of individual resources only expect the variables that are actually required for that resource (see oap.ResourceTypes).

Index

Constants

View Source
const (
	DynamoDB      voyager.ResourceType           = "DynamoDB"
	DynamoDBName  oap.ResourceType               = "dynamo-db"
	DynamoDBClass servicecatalog.ClassExternalID = "0dae543c-216b-4a08-87bd-aea7522c0cfd"
	DynamoDBPlan  servicecatalog.PlanExternalID  = "9b59fb3e-56eb-487d-863e-bf831ca4fa3f"
	DynamoPrefix  string                         = "DYNAMO"

	S3       voyager.ResourceType           = "S3"
	S3Name   oap.ResourceType               = "s3"
	S3Class  servicecatalog.ClassExternalID = "a6bf1e70-9bbb-4826-9793-75871cb540f1"
	S3Plan   servicecatalog.PlanExternalID  = "d8eca56a-9634-4e6f-a7c8-47e3bc76bc83"
	S3Prefix string                         = "S3"

	Cfn       voyager.ResourceType           = "CloudFormation"
	CfnName   oap.ResourceType               = "cloudformation"
	CfnClass  servicecatalog.ClassExternalID = "312ebba6-e3df-443f-a151-669a04f0619b"
	CfnPlan   servicecatalog.PlanExternalID  = "8933f0a5-b232-4319-9861-baaccece62fd"
	CfnPrefix string                         = "CF"
)

Variables

View Source
var (
	DynamoDBPlugin = func(vpc func(voyager.Location) *oap.VPCEnvironment) wiringutil.StatusAdapter {
		return wiringutil.StatusAdapter(Resource(DynamoDB, DynamoDBName, DynamoDBClass, DynamoDBPlan, dynamoDbServiceEnvironment, dynamoDbShapes, vpc).WireUp)
	}

	S3Plugin = func(vpc func(voyager.Location) *oap.VPCEnvironment) wiringutil.StatusAdapter {
		return wiringutil.StatusAdapter(Resource(S3, S3Name, S3Class, S3Plan, s3ServiceEnvironment, s3Shapes, vpc).WireUp)
	}

	CfnPlugin = func(vpc func(voyager.Location) *oap.VPCEnvironment) wiringutil.StatusAdapter {
		return wiringutil.StatusAdapter(Resource(Cfn, CfnName, CfnClass, CfnPlan, CfnServiceEnvironment, cfnShapes, vpc).WireUp)
	}
)

All osb-aws-provider resources are 'almost' the same, differing only in the service/plan names, what they need passed in the ServiceEnvironment.

Functions

Types

type ServiceEnvironmentGenerator

type ServiceEnvironmentGenerator func(env *oap.ServiceEnvironment) *oap.ServiceEnvironment

type ShapesFunc

type ShapesFunc func(resource *orch_v1.StateResource, smithResource *smith_v1.Resource, context *wiringplugin.WiringContext) ([]wiringplugin.Shape, bool, bool, error)

ShapesFunc is used to return a list of shapes for the resource to be used as input to the wiring functions of the dependants.

The `resource` is the orchestration level resource that was transformed into `smithResource`.

type WiringPlugin

type WiringPlugin struct {
	OAPResourceTypeName oap.ResourceType

	VPC func(location voyager.Location) *oap.VPCEnvironment
	// contains filtered or unexported fields
}

func Resource

func Resource(resourceType voyager.ResourceType,
	oapResourceTypeName oap.ResourceType,
	clusterServiceClassExternalID servicecatalog.ClassExternalID,
	clusterServicePlanExternalID servicecatalog.PlanExternalID,
	generateServiceEnvironment ServiceEnvironmentGenerator,
	shapes ShapesFunc,
	vpc func(voyager.Location) *oap.VPCEnvironment,
) *WiringPlugin

func (*WiringPlugin) WireUp

Jump to

Keyboard shortcuts

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