model

package
v0.0.0-...-3f5aa94 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlattenAirflowSettings

func FlattenAirflowSettings(ia *AirflowSettings) []map[string]interface{}

function to flatten airflow settings to the schema that is defined

func FlattenAutoscalingNodes

func FlattenAutoscalingNodes(ia *AutoscalingNodes) []map[string]interface{}

function to flatten Autoscaling Nodes Settings

func FlattenCloudConfig

func FlattenCloudConfig(ia *CloudConfig) []map[string]interface{}

function to flatten Cloud Config

func FlattenClusterComposition

func FlattenClusterComposition(ia *ClusterComposition) []map[string]interface{}

function to flatten Cluster Composition

func FlattenClusterInfo

func FlattenClusterInfo(ia *ClusterInfo) []map[string]interface{}

function to Cluster Info

func FlattenComputeConfig

func FlattenComputeConfig(ia *ComputeConfig) []map[string]interface{}

function to flatten Compute Config

func FlattenDatadisk

func FlattenDatadisk(ia *Datadisk) []map[string]interface{}

function to flatten Datadisk

func FlattenDatadog

func FlattenDatadog(ia *Datadog) []map[string]interface{}

function to flatten Datadog Settings

func FlattenDiskUpscalingConfig

func FlattenDiskUpscalingConfig(ia *DiskUpscalingConfig) []map[string]interface{}

function to Disk Upscaling Settings

func FlattenEngineConfig

func FlattenEngineConfig(ia *EngineConfig) []map[string]interface{}

function to flatten Engine Config Settings

func FlattenEnvSettings

func FlattenEnvSettings(ia *EnvSettings) []map[string]interface{}

function to flatten Env Settings

func FlattenFairSchedulerSettings

func FlattenFairSchedulerSettings(ia *FairSchedulerSettings) []map[string]interface{}

function to flatten fair scheduler Settings

func FlattenHadoopSettings

func FlattenHadoopSettings(ia *HadoopSettings) []map[string]interface{}

function to flatten Hadoop Settings

func FlattenHeterogeneousConfig

func FlattenHeterogeneousConfig(ia *HeterogeneousConfig) []map[string]interface{}

function to flatten Heterogeneous Configuration

func FlattenHiveSettings

func FlattenHiveSettings(ia *HiveSettings) []map[string]interface{}

function to flatten Hive Settings

func FlattenInternal

func FlattenInternal(ia *Internal) []map[string]interface{}

function to flatten Internal Config

func FlattenLocation

func FlattenLocation(ia *Location) []map[string]interface{}

function to flatten Location Config

func FlattenMaster

func FlattenMaster(ia *Master) []map[string]interface{}

function to flatten Master Settings

func FlattenMinNodes

func FlattenMinNodes(ia *MinNodes) []map[string]interface{}

function to flatten Min Nodes Settings

func FlattenMonitoring

func FlattenMonitoring(ia *Monitoring) []map[string]interface{}

function to flatten Monitoring Config

func FlattenNetworkConfig

func FlattenNetworkConfig(ia *NetworkConfig) []map[string]interface{}

function to flatten Network Config

func FlattenPrestoSettings

func FlattenPrestoSettings(ia *PrestoSettings) []map[string]interface{}

function to flatten Presto Settings

func FlattenRootdisk

func FlattenRootdisk(ia *Rootdisk) []map[string]interface{}

function to flatten Rootdisk

func FlattenSparkSettings

func FlattenSparkSettings(ia *SparkSettings) []map[string]interface{}

function to flatten Spark Settings

func FlattenSpotBlockSettings

func FlattenSpotBlockSettings(ia *SpotBlockSettings) []map[string]interface{}

function to flatten Spot Block Settings

func FlattenSpotInstanceSettings

func FlattenSpotInstanceSettings(ia *SpotInstanceSettings) []map[string]interface{}

function to flatten Spot Instance Settings

func FlattenSpotSettings

func FlattenSpotSettings(ia *SpotSettings) []map[string]interface{}

function to flatten Spot Settings

func FlattenStableSpotInstanceSettings

func FlattenStableSpotInstanceSettings(ia *StableSpotInstanceSettings) []map[string]interface{}

function to flatten Stable Spot Instance Settings

func FlattenStorageConfig

func FlattenStorageConfig(ia *StorageConfig) []map[string]interface{}

function to flatten Storage Config

func FlattenUpscalingConfig

func FlattenUpscalingConfig(ia *UpscalingConfig) []map[string]interface{}

function to flatten EBS Upscaling Config

func ReadAirflowSettingsFromTf

func ReadAirflowSettingsFromTf(airflow_settings *AirflowSettings, airflowSettings []interface{}) bool

func ReadAutoscalingNodesFromTf

func ReadAutoscalingNodesFromTf(autoscalingNodes *AutoscalingNodes, autoscalingNodesSettings []interface{}) bool

func ReadClusterCompositionFromTf

func ReadClusterCompositionFromTf(cluster_composition *ClusterComposition, clusterComposition []interface{}) bool

Read Cluster Composition from terraform file

func ReadComputeConfigFromTf

func ReadComputeConfigFromTf(compute_config *ComputeConfig, computeConfig []interface{}) bool

func ReadDatadiskFromTf

func ReadDatadiskFromTf(datadisk *Datadisk, datadiskConfig []interface{}) bool

func ReadDatadogFromTf

func ReadDatadogFromTf(datadog *Datadog, datadogSettings []interface{}) bool

func ReadDiskUpscalingConfigFromTf

func ReadDiskUpscalingConfigFromTf(disk_upscaling_config *DiskUpscalingConfig, diskUpscalingConfig []interface{}) bool

func ReadEnvSettingsFromTf

func ReadEnvSettingsFromTf(env_settings *EnvSettings, envSettings []interface{}) bool

func ReadFairSchedulerSettingsFromTf

func ReadFairSchedulerSettingsFromTf(fairscheduler_settings *FairSchedulerSettings, fairSchedulerSettings []interface{}) bool

func ReadHadoopSettingsSettingsFromTf

func ReadHadoopSettingsSettingsFromTf(hadoop_settings *HadoopSettings, hadoopSettings []interface{}) bool

func ReadHeterogeneousConfigFromTf

func ReadHeterogeneousConfigFromTf(heterogeneous_config *HeterogeneousConfig, heterogeneousConfigs []interface{}) bool

func ReadHiveSettingsFromTf

func ReadHiveSettingsFromTf(hive_settings *HiveSettings, hiveSettings []interface{}) bool

func ReadLocationFromTf

func ReadLocationFromTf(location *Location, locationConfig []interface{}) bool

func ReadMasterFromTf

func ReadMasterFromTf(master *Master, masterSettings []interface{}) bool

func ReadMinNodesFromTf

func ReadMinNodesFromTf(minNodes *MinNodes, minNodesSettings []interface{}) bool

func ReadNetworkConfigFromTf

func ReadNetworkConfigFromTf(network_config *NetworkConfig, networkConfig []interface{}) bool

func ReadPrestoSettingsFromTf

func ReadPrestoSettingsFromTf(presto_settings *PrestoSettings, prestoSettings []interface{}) bool

func ReadRootdiskFromTf

func ReadRootdiskFromTf(rootdisk *Rootdisk, rootdiskConfig []interface{}) bool

func ReadSparkSettingsFromTf

func ReadSparkSettingsFromTf(spark_settings *SparkSettings, sparkSettings []interface{}) bool

func ReadSpotBlockSettingsFromTf

func ReadSpotBlockSettingsFromTf(spot_block_settings *SpotBlockSettings, spotBlockSettings []interface{}) bool

func ReadSpotInstanceSettingsFromTf

func ReadSpotInstanceSettingsFromTf(spot_instance_settings *SpotInstanceSettings, spotInstanceSettings []interface{}) bool

func ReadSpotSettingsFromTf

func ReadSpotSettingsFromTf(spot_settings *SpotSettings, spotSettings []interface{}) bool

func ReadStableSpotInstanceSettingsFromTf

func ReadStableSpotInstanceSettingsFromTf(stable_spot_instance_settings *StableSpotInstanceSettings, stableSpotInstanceSettings []interface{}) bool

func ReadStorageConfigFromTf

func ReadStorageConfigFromTf(storage_config *StorageConfig, storageConfig []interface{}) bool

func ReadUpscalingConfigFromTf

func ReadUpscalingConfigFromTf(upscaling_config *UpscalingConfig, ebsUpscalingConfigs []interface{}) bool

Types

type AirflowSettings

type AirflowSettings struct {
	Dbtap_id               int    `json:"dbtap_id,omitempty"`
	Fernet_key             string `json:"fernet_key,omitempty"`
	Overrides              string `json:"overrides,omitempty"`
	Version                string `json:"version,omitempty"`
	Airflow_python_version string `json:"airflow_python_version,omitempty"`
}

type AutoscalingNodes

type AutoscalingNodes struct {
	Preemptible bool    `json:"preemptible,omitempty"`
	Percentage  float32 `json:"percentage,omitempty"`
}

type CloudConfig

type CloudConfig struct {
	Provider            string        `json:"provider,omitempty"`
	Resource_group_name string        `json:"resource_group_name,omitempty"`
	Compute_config      ComputeConfig `json:"compute_config,omitempty"`
	Location            Location      `json:"location,omitempty"`
	Network_config      NetworkConfig `json:"network_config,omitempty"`
	//Azure elements
	Storage_config StorageConfig `json:"storage_config,omitempty"`
	//GCP elements
	Cluster_composition ClusterComposition `json:"cluster_composition,omitempty"`
}

func ReadCloudConfigFromTf

func ReadCloudConfigFromTf(d *schema.ResourceData) (CloudConfig, bool)

Read Cloud Config from terraform file

type Cluster

type Cluster struct {
	Id            int          `json:"id,omitempty"`
	State         string       `json:"state,omitempty"`
	Cloud_config  CloudConfig  `json:"cloud_config,omitempty"`
	Cluster_info  ClusterInfo  `json:"cluster_info,omitempty"`
	Engine_config EngineConfig `json:"engine_config,omitempty"`
	Monitoring    Monitoring   `json:"monitoring,omitempty"`
	Internal      Internal     `json:"internal,omitempty"`
}

func ReadClusterFromTf

func ReadClusterFromTf(d *schema.ResourceData) (Cluster, bool)

Read cluster information from terraform file

type ClusterComposition

type ClusterComposition struct {
	Master            Master           `json:"master,omitempty"`
	Min_nodes         MinNodes         `json:"min_nodes,omitempty"`
	Autoscaling_nodes AutoscalingNodes `json:"autoscaling_nodes,omitempty"`
}

type ClusterInfo

type ClusterInfo struct {
	Master_instance_type         string              `json:"master_instance_type,omitempty"`
	Slave_instance_type          string              `json:"slave_instance_type,omitempty"`
	Node_base_cooldown_period    int                 `json:"node_base_cooldown_period,omitempty"`
	Label                        []string            `json:"label,omitempty"`
	Min_nodes                    int                 `json:"min_nodes,omitempty"`
	Max_nodes                    int                 `json:"max_nodes,omitempty"`
	Idle_cluster_timeout_in_secs int                 `json:"idle_cluster_timeout_in_secs,omitempty"`
	Cluster_name                 string              `json:"cluster_name,omitempty"`
	Node_bootstrap               string              `json:"node_bootstrap,omitempty"`
	Disallow_cluster_termination bool                `json:"disallow_cluster_termination,omitempty"`
	Force_tunnel                 bool                `json:"force_tunnel,omitempty"`
	Customer_ssh_key             string              `json:"customer_ssh_key,omitempty"`
	Child_hs2_cluster_id         int                 `json:"child_hs2_cluster_id,omitempty"`
	Parent_cluster_id            int                 `json:"parent_cluster_id,omitempty"`
	Env_settings                 EnvSettings         `json:"env_settings,omitempty"`
	Datadisk                     Datadisk            `json:"datadisk,omitempty"`
	Heterogeneous_config         HeterogeneousConfig `json:"heterogeneous_config,omitempty"`
	Slave_request_type           string              `json:"slave_request_type,omitempty"`
	Spot_settings                SpotSettings        `json:"spot_settings,omitempty"`
	Custom_tags                  map[string]string   `json:"custom_tags,omitempty"`
	Fallback_to_ondemand         bool                `json:"fallback_to_ondemand,omitempty"`

	//GCP Elements
	Node_volatile_cooldown_period int      `json:"node_volatile_cooldown_period,omitempty"`
	Rootdisk                      Rootdisk `json:"rootdisk,omitempty"`
}

func ReadClusterInfoFromTf

func ReadClusterInfoFromTf(d *schema.ResourceData) (ClusterInfo, bool)

Read Cluster Info From Terraform File

type ComputeConfig

type ComputeConfig struct {
	Compute_validated         bool   `json:"compute_validated,omitempty"`
	Use_account_compute_creds bool   `json:"use_account_compute_creds,omitempty"`
	Instance_tenancy          string `json:"instance_tenancy,omitempty"`
	Compute_role_arn          string `json:"compute_role_arn,omitempty"`
	Compute_external_id       string `json:"compute_external_id,omitempty"`
	Role_instance_profile     string `json:"role_instance_profile,omitempty"`
	//Azure elements
	Compute_client_id       string `json:"compute_client_id,omitempty"`
	Compute_client_secret   string `json:"compute_client_secret,omitempty"`
	Compute_tenant_id       string `json:"compute_tenant_id,omitempty"`
	Compute_subscription_id string `json:"compute_subscription_id,omitempty"`
	//GCP elements
	Customer_project_id string `json:"customer_project_id,omitempty"`
}

type Datadisk

type Datadisk struct {
	Count            int             `json:"count,omitempty"`
	Disktype         string          `json:"type,omitempty"`
	Encryption       bool            `json:"encryption,omitempty"`
	Size             int             `json:"size,omitempty"`
	Upscaling_config UpscalingConfig `json:"upscaling_config,omitempty"`
}

func (*Datadisk) UnmarshalJSON

func (u *Datadisk) UnmarshalJSON(data []byte) error

Custom unmarshalling logic

type Datadog

type Datadog struct {
	Datadog_api_token string `json:"datadog_api_token,omitempty"`
	Datadog_app_token string `json:"datadog_app_token,omitempty"`
}

type DiskUpscalingConfig

type DiskUpscalingConfig struct {
	Percent_free_space_threshold  float32 `json:"percent_free_space_threshold,omitempty"`
	Max_data_disk_count           int     `json:"max_data_disk_count,omitempty"`
	Absolute_free_space_threshold float32 `json:"absolute_free_space_threshold,omitempty"`

	//GCP Elements
	Max_persistent_disk_count int `json:"max_persistent_disk_count,omitempty"`
}

type EngineConfig

type EngineConfig struct {
	Flavour          string          `json:"flavour,omitempty"`
	Hadoop_settings  HadoopSettings  `json:"hadoop_settings,omitempty"`
	Presto_settings  PrestoSettings  `json:"presto_settings,omitempty"`
	Spark_settings   SparkSettings   `json:"spark_settings,omitempty"`
	Hive_settings    HiveSettings    `json:"hive_settings,omitempty"`
	Airflow_settings AirflowSettings `json:"airflow_settings,omitempty"`
}

func ReadEngineConfigFromTf

func ReadEngineConfigFromTf(d *schema.ResourceData) (EngineConfig, bool)

Read Engine Config from Terraform File

type EnvSettings

type EnvSettings struct {
	Python_version string `json:"python_version,omitempty"`
	R_version      string `json:"r_version,omitempty"`
	Name           string `json:"name,omitempty"`
}

type FairSchedulerSettings

type FairSchedulerSettings struct {
	Default_pool             string `json:",default_pool,omitempty"`
	Fairscheduler_config_xml string `json:",fairscheduler_config_xml,omitempty"`
}

type HadoopSettings

type HadoopSettings struct {
	Use_qubole_placement_policy bool                  `json:"use_qubole_placement_policy,omitempty"`
	Is_ha                       bool                  `json:"is_ha,omitempty"`
	Custom_hadoop_config        string                `json:"custom_hadoop_config,omitempty"`
	Fairscheduler_settings      FairSchedulerSettings `json:"fairscheduler_settings,omitempty"`
}

type HeterogeneousConfig

type HeterogeneousConfig struct {
	Memory []map[string]interface{} `json:"memory,omitempty"`
}

type HiveSettings

type HiveSettings struct {
	Is_hs2                    bool   `json:"is_hs2,omitempty"`
	Hive_version              string `json:"hive_version,omitempty"`
	Is_metadata_cache_enabled bool   `json:"is_metadata_cache_enabled,omitempty"`
	Hs2_thrift_port           int    `json:"hs2_thrift_port,omitempty"`
	Overrides                 string `json:"overrides,omitempty"`
	Execution_engine          string `json:"execution_engine,omitempty"`
}

type Internal

type Internal struct {
	Zeppelin_interpreter_mode string `json:"zeppelin_interpreter_mode,omitempty"`
	Spark_s3_package_name     string `json:"spark_s3_package_name,omitempty"`
	Zeppelin_s3_package_name  string `json:"zeppelin_s3_package_name,omitempty"`
}

func ReadInternalFromTf

func ReadInternalFromTf(d *schema.ResourceData) (Internal, bool)

Read Internal Information from terraform file

type Location

type Location struct {
	Aws_region            string `json:"aws_region,omitempty"`
	Aws_availability_zone string `json:"aws_availability_zone,omitempty"`
	//Azure elements
	Location string `json:"location,omitempty"`
	//GCP elements
	Region string `json:"region,omitempty"`
	Zone   string `json:"zone,omitempty"`
}

type Master

type Master struct {
	Preemptible bool `json:"preemptible,omitempty"`
}

type MinNodes

type MinNodes struct {
	Preemptible bool    `json:"preemptible,omitempty"`
	Percentage  float32 `json:"percentage,omitempty"`
}

type Monitoring

type Monitoring struct {
	Ganglia bool    `json:"ganglia,omitempty"`
	Datadog Datadog `json:"datadog,omitempty"`
}

func ReadMonitoringFromTf

func ReadMonitoringFromTf(d *schema.ResourceData) (Monitoring, bool)

Read Monitoring Informtion from Terraform file

type NetworkConfig

type NetworkConfig struct {
	Vpc_id                     string `json:"vpc_id,omitempty"`
	Subnet_id                  string `json:"subnet_id,omitempty"`
	Bastion_node_public_dns    string `json:"bastion_node_public_dns,omitempty"`
	Bastion_node_port          int    `json:"bastion_node_port,omitempty"`
	Bastion_node_user          string `json:"bastion_node_user,omitempty"`
	Master_elastic_ip          string `json:"master_elastic_ip,omitempty"`
	Persistent_security_groups string `json:"persistent_security_groups,omitempty"`
	//Azure elements
	Persistent_security_group_resource_group_name string `json:"persistent_security_group_resource_group_name,omitempty"`
	Persistent_security_group_name                string `json:"persistent_security_group_name,omitempty"`
	Vnet_name                                     string `json:"vnet_name,omitempty"`
	Subnet_name                                   string `json:"subnet_name,omitempty"`
	Vnet_resource_group_name                      string `json:"vnet_resource_group_name,omitempty"`
	Master_static_nic_name                        string `json:"master_static_nic_name,omitempty"`
	Master_static_public_ip_name                  string `json:"master_static_public_ip_name,omitempty"`
	//GCP Elements
	Network          string `json:"network,omitempty"`
	Subnet           string `json:"subnet,omitempty"`
	Master_static_ip string `json:"master_static_ip,omitempty"`
}

type PrestoSettings

type PrestoSettings struct {
	Presto_version       string `json:"presto_version,omitempty"`
	Custom_presto_config string `json:"custom_presto_config,omitempty"`
	Enable_rubix         bool   `json:"enable_rubix,omitempty"`
}

type Rootdisk

type Rootdisk struct {
	Size int `json:"size,omitempty"`
}

type SparkSettings

type SparkSettings struct {
	Custom_spark_config string `json:"custom_spark_config,omitempty"`
	Spark_version       string `json:"spark_version,omitempty"`
	Enable_rubix        bool   `json:"enable_rubix,omitempty"`
}

type SpotBlockSettings

type SpotBlockSettings struct {
	Duration int `json:"duration,omitempty"`
}

type SpotInstanceSettings

type SpotInstanceSettings struct {
	Maximum_bid_price_percentage     float32 `json:"maximum_bid_price_percentage,omitempty"`
	Timeout_for_request              int     `json:"timeout_for_request,omitempty"`
	Maximum_spot_instance_percentage float32 `json:"maximum_spot_instance_percentage,omitempty"`
}

type SpotSettings

type SpotSettings struct {
	Spot_instance_settings        SpotInstanceSettings       `json:"spot_instance_settings,omitempty"`
	Spot_block_settings           SpotBlockSettings          `json:"spot_block_settings,omitempty"`
	Stable_spot_instance_settings StableSpotInstanceSettings `json:"stable_spot_instance_settings,omitempty"`
}

type StableSpotInstanceSettings

type StableSpotInstanceSettings struct {
	Maximum_bid_price_percentage float32 `json:"maximum_bid_price_percentage,omitempty"`
	Timeout_for_request          int     `json:"timeout_for_request,omitempty"`
}

type StorageConfig

type StorageConfig struct {
	Storage_access_key   string `json:"storage_access_key,omitempty"`
	Storage_account_name string `json:"storage_account_name,omitempty"`
	//Azure Elements
	Disk_storage_account_name                string `json:"disk_storage_account_name,omitempty"`
	Disk_storage_account_resource_group_name string `json:"disk_storage_account_resource_group_name,omitempty"`
	Managed_disk_account_type                string `json:"managed_disk_account_type,omitempty"`
	Data_disk_count                          int    `json:"data_disk_count,omitempty"`
	Data_disk_size                           int    `json:"data_disk_size,omitempty"`
	//GCP Elements
	Customer_project_id string `json:"customer_project_id,omitempty"`
	Disk_type           string `json:"disk_type,omitempty"`
	Disk_size_in_gb     int    `json:"disk_size_in_gb,omitempty"`
	Disk_count          int    `json:"disk_count,omitempty"`

	Disk_upscaling_config DiskUpscalingConfig `json:"disk_upscaling_config,omitempty"`
}

type UpscalingConfig

type UpscalingConfig struct {
	Max_ebs_volume_count          int     `json:"max_ebs_volume_count,omitempty"`
	Percent_free_space_threshold  float32 `json:"percent_free_space_threshold,omitempty"`
	Absolute_free_space_threshold float32 `json:"absolute_free_space_threshold,omitempty"`
	Sampling_interval             int     `json:"sampling_interval,omitempty"`
	Sampling_window               int     `json:"sampling_window,omitempty"`
}

Jump to

Keyboard shortcuts

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