Documentation ¶
Index ¶
- Constants
- Variables
- func NullifyStates()
- func ToJson(object interface{}) (string, error)
- type ElastigroupResource
- type FieldName
- type GenericField
- type GenericFields
- type GenericResource
- func (res *GenericResource) GetField(fieldName FieldName) *GenericField
- func (res *GenericResource) GetName() string
- func (res *GenericResource) GetSchemaMap() map[string]*schema.Schema
- func (res *GenericResource) GetTerraformData() *TerraformData
- func (res *GenericResource) OnRead(resourceObject interface{}) error
- func (res *GenericResource) SetTerraformData(data *TerraformData)
- type LogFormat
- type ResourceAffinity
- type ResourceName
- type SubscriptionResource
- type TerraformData
Constants ¶
View Source
const ( FailureFieldReadPattern = "failed reading field %v - %#v" FailureFieldCreatePattern = "failed creating field %v - %#v" FailureFieldUpdatePattern = "failed updating field %v - %#v" FieldUpdateNotAllowedPattern = "field [%v] is immutable, cannot be changed post group creation" ProviderToken FieldName = "token" ProviderAccount FieldName = "account" Subscription ResourceAffinity = "Subscription" ElastigroupAWS ResourceAffinity = "Elastigroup_AWS" ElastigroupInstanceType ResourceAffinity = "Elastigroup_Instance_Type" ElastigroupStrategy ResourceAffinity = "Elastigroup_Strategy" ElastigroupStateful ResourceAffinity = "Elastigroup_Stateful" ElastigroupLaunchConfiguration ResourceAffinity = "Elastigroup_Launch_Configuration" ElastigroupNetworkInterface ResourceAffinity = "Elastigroup_Network_Interface" ElastigroupScheduledTask ResourceAffinity = "Elastigroup_Scheduled_Task" ElastigroupBlockDevices ResourceAffinity = "Elastigroup_Block_Device" ElastigroupScalingPolicies ResourceAffinity = "Elastigroup_Scaling_Policies" ElastigroupIntegrations ResourceAffinity = "Elastigroup_Integrations" ResourceFieldOnRead LogFormat = "onRead() -> %s -> %s" ResourceFieldOnCreate LogFormat = "onCreate() -> %s -> %s" ResourceFieldOnUpdate LogFormat = "onUpdate() -> %s -> %s" ResourceOnDelete LogFormat = "onDelete() -> %s -> started for %s..." ResourceOnUpdate LogFormat = "onUpdate() -> %s -> started for %s..." ResourceOnRead LogFormat = "onRead() -> %s -> started for %s..." ResourceOnCreate LogFormat = "onCreate() -> %s -> started..." )
Variables ¶
View Source
var StatusEbsBlockDeviceUpdated = false
View Source
var StatusElbUpdated = false
Load Balancers
View Source
var StatusEphemeralBlockDeviceUpdated = false
Block Devices
View Source
var StatusMlbUpdated = false
View Source
var StatusTgUpdated = false
Functions ¶
func NullifyStates ¶
func NullifyStates()
Types ¶
type ElastigroupResource ¶
type ElastigroupResource struct { GenericResource // embedding // contains filtered or unexported fields }
var SpotinstElastigroup *ElastigroupResource
func NewElastigroupResource ¶
func NewElastigroupResource(fieldsMap map[FieldName]*GenericField) *ElastigroupResource
func (*ElastigroupResource) GetElastigroup ¶
func (res *ElastigroupResource) GetElastigroup() *aws.Group
func (*ElastigroupResource) OnCreate ¶
func (res *ElastigroupResource) OnCreate( resourceData *schema.ResourceData, meta interface{}) error
func (*ElastigroupResource) OnUpdate ¶
func (res *ElastigroupResource) OnUpdate( resourceData *schema.ResourceData, meta interface{}) (bool, error)
type GenericField ¶
type GenericField struct {
// contains filtered or unexported fields
}
func NewGenericField ¶
func NewGenericField( resourceAffinity ResourceAffinity, fieldName FieldName, schema *schema.Schema, onRead onFieldRead, onCreate onFieldCreate, onUpdate onFieldUpdate, hasChangeCustom hasFieldChange) *GenericField
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Constructors
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
func (*GenericField) GetSchema ¶
func (field *GenericField) GetSchema() *schema.Schema
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Methods: GenericField
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
type GenericFields ¶
type GenericFields struct {
// contains filtered or unexported fields
}
func NewGenericFields ¶
func NewGenericFields(fieldsMap map[FieldName]*GenericField) *GenericFields
type GenericResource ¶
type GenericResource struct {
// contains filtered or unexported fields
}
func (*GenericResource) GetField ¶
func (res *GenericResource) GetField(fieldName FieldName) *GenericField
func (*GenericResource) GetName ¶
func (res *GenericResource) GetName() string
func (*GenericResource) GetSchemaMap ¶
func (res *GenericResource) GetSchemaMap() map[string]*schema.Schema
func (*GenericResource) GetTerraformData ¶
func (res *GenericResource) GetTerraformData() *TerraformData
func (*GenericResource) OnRead ¶
func (res *GenericResource) OnRead( resourceObject interface{}) error
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Methods: GenericResource
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
func (*GenericResource) SetTerraformData ¶
func (res *GenericResource) SetTerraformData(data *TerraformData)
type ResourceAffinity ¶
type ResourceAffinity string
type ResourceName ¶
type ResourceName string
const (
ElastigroupAwsResourceName ResourceName = "spotinst_elastigroup_aws"
)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Variables
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
const (
SubscriptionResourceName ResourceName = "spotinst_subscription"
)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Variables
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
type SubscriptionResource ¶
type SubscriptionResource struct { GenericResource // embedding // contains filtered or unexported fields }
var SpotinstSubscription *SubscriptionResource
func NewSubscriptionResource ¶
func NewSubscriptionResource( fieldsMap map[FieldName]*GenericField) *SubscriptionResource
func (*SubscriptionResource) GetSubscription ¶
func (res *SubscriptionResource) GetSubscription() *subscription.Subscription
func (*SubscriptionResource) OnCreate ¶
func (res *SubscriptionResource) OnCreate( resourceData *schema.ResourceData, meta interface{}) error
func (*SubscriptionResource) OnUpdate ¶
func (res *SubscriptionResource) OnUpdate( resourceData *schema.ResourceData, meta interface{}) (bool, error)
type TerraformData ¶
type TerraformData struct { ResourceData *schema.ResourceData Meta interface{} }
Click to show internal directories.
Click to hide internal directories.