Documentation
¶
Index ¶
- func CheckAvailableMigration(ctx context.Context, plan types.Object, state types.Object) (bool, diag.Diagnostics)
- func CompatibleWithNodeRoles(version string) (bool, error)
- func ElasticsearchPayload(ctx context.Context, plan types.Object, state *types.Object, ...) (*models.ElasticsearchPayload, diag.Diagnostics)
- func ElasticsearchRemoteClusterSchema() schema.Attribute
- func ElasticsearchRemoteClustersPayload(ctx context.Context, clustersTF types.Set) (*models.RemoteResources, diag.Diagnostics)
- func ElasticsearchSchema() schema.Attribute
- func ElasticsearchSnapshotSourceSchema() schema.Attribute
- func ElasticsearchTopologyAttrs() map[string]attr.Type
- func EnrichElasticsearchTemplate(tpl *models.ElasticsearchPayload, templateId, version string, ...) *models.ElasticsearchPayload
- func EnrichWithEmptyTopologies(tpl, want *models.ElasticsearchPayload) *models.ElasticsearchPayload
- func GetTopologyFromMigrateRequest(migrateUpdateRequest *deployments.MigrateDeploymentTemplateOK, esTier string) *models.ElasticsearchClusterTopologyElement
- func IsElasticsearchStopped(res *models.ElasticsearchResourceInfo) bool
- func PlanHasNodeTypes(ctx context.Context, planElasticsearch types.Object) (bool, diag.Diagnostics)
- func SetLatestInstanceConfigInfo(currentTopology *ElasticsearchTopology, ...)
- func SetLatestInstanceConfigInfoToCurrent(topology *ElasticsearchTopology)
- func SetUnknownOnTopologySizeChange() planmodifier.Set
- func UseNodeRoles(ctx context.Context, stateVersion, planVersion types.String, ...) (bool, diag.Diagnostics)
- func UseNodeRolesDefault() nodeRolesDefault
- func UseNodeTypesDefault() nodeTypesDefault
- func UseStateForUnknownUnlessNameOrKibanaStateChanges() planmodifier.String
- func UseTopologyStateForUnknown(topologyAttributeName string) useTopologyState
- func VersionSupportsNodeRoles() validator.Set
- func VersionSupportsNodeTypes() validator.String
- type Elasticsearch
- type ElasticsearchConfig
- type ElasticsearchExtensions
- type ElasticsearchKeystoreContents
- type ElasticsearchKeystoreContentsTF
- type ElasticsearchRemoteCluster
- type ElasticsearchRemoteClusterTF
- type ElasticsearchRemoteClusters
- type ElasticsearchSnapshot
- type ElasticsearchSnapshotRepositoryInfo
- type ElasticsearchSnapshotRepositoryInfoTF
- type ElasticsearchSnapshotRepositoryReference
- type ElasticsearchSnapshotRepositoryReferenceTF
- type ElasticsearchSnapshotSource
- type ElasticsearchSnapshotTF
- type ElasticsearchTF
- type ElasticsearchTopologies
- type ElasticsearchTopology
- type ElasticsearchTopologyAutoscaling
- type ElasticsearchTopologyTF
- type ElasticsearchTrustAccounts
- type ElasticsearchTrustExternals
- type PlanModifierResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAvailableMigration ¶ added in v0.10.0
func CompatibleWithNodeRoles ¶
func ElasticsearchPayload ¶
func ElasticsearchPayload(ctx context.Context, plan types.Object, state *types.Object, updateResources *models.DeploymentUpdateResources, dtID, version string, useNodeRoles bool) (*models.ElasticsearchPayload, diag.Diagnostics)
func ElasticsearchRemoteClustersPayload ¶
func ElasticsearchRemoteClustersPayload(ctx context.Context, clustersTF types.Set) (*models.RemoteResources, diag.Diagnostics)
func ElasticsearchSchema ¶
func ElasticsearchSnapshotSourceSchema ¶ added in v0.10.0
func ElasticsearchTopologyAttrs ¶ added in v0.11.0
func EnrichElasticsearchTemplate ¶
func EnrichElasticsearchTemplate(tpl *models.ElasticsearchPayload, templateId, version string, useNodeRoles bool) *models.ElasticsearchPayload
func EnrichWithEmptyTopologies ¶
func EnrichWithEmptyTopologies(tpl, want *models.ElasticsearchPayload) *models.ElasticsearchPayload
func GetTopologyFromMigrateRequest ¶ added in v0.10.0
func GetTopologyFromMigrateRequest(migrateUpdateRequest *deployments.MigrateDeploymentTemplateOK, esTier string) *models.ElasticsearchClusterTopologyElement
func IsElasticsearchStopped ¶
func IsElasticsearchStopped(res *models.ElasticsearchResourceInfo) bool
IsElasticsearchStopped returns true if the resource is stopped.
func PlanHasNodeTypes ¶ added in v0.10.0
func SetLatestInstanceConfigInfo ¶ added in v0.10.0
func SetLatestInstanceConfigInfo(currentTopology *ElasticsearchTopology, latestTopology *models.ElasticsearchClusterTopologyElement)
func SetLatestInstanceConfigInfoToCurrent ¶ added in v0.10.0
func SetLatestInstanceConfigInfoToCurrent(topology *ElasticsearchTopology)
func SetUnknownOnTopologySizeChange ¶ added in v0.8.0
func SetUnknownOnTopologySizeChange() planmodifier.Set
func UseNodeRoles ¶
func UseNodeRolesDefault ¶
func UseNodeRolesDefault() nodeRolesDefault
func UseNodeTypesDefault ¶
func UseNodeTypesDefault() nodeTypesDefault
func UseStateForUnknownUnlessNameOrKibanaStateChanges ¶ added in v0.8.0
func UseStateForUnknownUnlessNameOrKibanaStateChanges() planmodifier.String
Use current state for instead of unknown, unless the deployment name change or Kibana is being enabled/disabled
func UseTopologyStateForUnknown ¶
func UseTopologyStateForUnknown(topologyAttributeName string) useTopologyState
UseTopologyStateForUnknown Use current state for a topology's attribute, unless one of the following scenarios occurs:
- The deployment template attribute has changed
- `migrate_to_latest_hardware` is set to `true` and there is a migration available to be performed
func VersionSupportsNodeRoles ¶ added in v0.9.0
func VersionSupportsNodeTypes ¶ added in v0.9.0
Types ¶
type Elasticsearch ¶
type Elasticsearch struct {
Autoscale *bool `tfsdk:"autoscale"`
RefId *string `tfsdk:"ref_id"`
ResourceId *string `tfsdk:"resource_id"`
Region *string `tfsdk:"region"`
CloudID *string `tfsdk:"cloud_id"`
HttpEndpoint *string `tfsdk:"http_endpoint"`
HttpsEndpoint *string `tfsdk:"https_endpoint"`
HotTier *ElasticsearchTopology `tfsdk:"hot"`
CoordinatingTier *ElasticsearchTopology `tfsdk:"coordinating"`
MasterTier *ElasticsearchTopology `tfsdk:"master"`
WarmTier *ElasticsearchTopology `tfsdk:"warm"`
ColdTier *ElasticsearchTopology `tfsdk:"cold"`
FrozenTier *ElasticsearchTopology `tfsdk:"frozen"`
MlTier *ElasticsearchTopology `tfsdk:"ml"`
Config *ElasticsearchConfig `tfsdk:"config"`
RemoteCluster ElasticsearchRemoteClusters `tfsdk:"remote_cluster"`
Snapshot *ElasticsearchSnapshot `tfsdk:"snapshot"`
SnapshotSource *ElasticsearchSnapshotSource `tfsdk:"snapshot_source"`
Extension ElasticsearchExtensions `tfsdk:"extension"`
TrustAccount ElasticsearchTrustAccounts `tfsdk:"trust_account"`
TrustExternal ElasticsearchTrustExternals `tfsdk:"trust_external"`
Strategy *string `tfsdk:"strategy"`
KeystoreContents map[string]ElasticsearchKeystoreContents `tfsdk:"keystore_contents"`
}
func ReadElasticsearches ¶
func ReadElasticsearches(in []*models.ElasticsearchResourceInfo, remotes *models.RemoteResources) (*Elasticsearch, error)
func (*Elasticsearch) GetTopologies ¶ added in v0.10.0
func (es *Elasticsearch) GetTopologies() []*ElasticsearchTopology
type ElasticsearchConfig ¶
type ElasticsearchConfig v1.ElasticsearchConfig
func (*ElasticsearchConfig) IsEmpty ¶
func (c *ElasticsearchConfig) IsEmpty() bool
type ElasticsearchExtensions ¶
type ElasticsearchExtensions v1.ElasticsearchExtensions
type ElasticsearchKeystoreContents ¶ added in v0.9.0
type ElasticsearchKeystoreContentsTF ¶ added in v0.9.0
type ElasticsearchRemoteClusters ¶
type ElasticsearchRemoteClusters []ElasticsearchRemoteCluster
type ElasticsearchSnapshot ¶ added in v0.7.0
type ElasticsearchSnapshot struct {
Enabled bool `tfsdk:"enabled"`
Repository *ElasticsearchSnapshotRepositoryInfo `tfsdk:"repository"`
}
type ElasticsearchSnapshotRepositoryInfo ¶ added in v0.7.0
type ElasticsearchSnapshotRepositoryInfo struct {
Reference *ElasticsearchSnapshotRepositoryReference `tfsdk:"reference"`
}
type ElasticsearchSnapshotRepositoryInfoTF ¶ added in v0.10.0
type ElasticsearchSnapshotRepositoryReference ¶ added in v0.7.0
type ElasticsearchSnapshotRepositoryReference struct {
RepositoryName string `tfsdk:"repository_name"`
}
type ElasticsearchSnapshotRepositoryReferenceTF ¶ added in v0.10.0
type ElasticsearchSnapshotSource ¶
type ElasticsearchSnapshotSource v1.ElasticsearchSnapshotSource
type ElasticsearchSnapshotTF ¶ added in v0.8.0
type ElasticsearchTF ¶
type ElasticsearchTF struct {
Autoscale types.Bool `tfsdk:"autoscale"`
RefId types.String `tfsdk:"ref_id"`
ResourceId types.String `tfsdk:"resource_id"`
Region types.String `tfsdk:"region"`
CloudID types.String `tfsdk:"cloud_id"`
HttpEndpoint types.String `tfsdk:"http_endpoint"`
HttpsEndpoint types.String `tfsdk:"https_endpoint"`
HotContentTier types.Object `tfsdk:"hot"`
CoordinatingTier types.Object `tfsdk:"coordinating"`
MasterTier types.Object `tfsdk:"master"`
WarmTier types.Object `tfsdk:"warm"`
ColdTier types.Object `tfsdk:"cold"`
FrozenTier types.Object `tfsdk:"frozen"`
MlTier types.Object `tfsdk:"ml"`
Config types.Object `tfsdk:"config"`
RemoteCluster types.Set `tfsdk:"remote_cluster"`
Snapshot types.Object `tfsdk:"snapshot"`
SnapshotSource types.Object `tfsdk:"snapshot_source"`
Extension types.Set `tfsdk:"extension"`
TrustAccount types.Set `tfsdk:"trust_account"`
TrustExternal types.Set `tfsdk:"trust_external"`
Strategy types.String `tfsdk:"strategy"`
KeystoreContents types.Map `tfsdk:"keystore_contents"`
}
type ElasticsearchTopologies ¶
type ElasticsearchTopologies []ElasticsearchTopology
func (ElasticsearchTopologies) AsSet ¶
func (tops ElasticsearchTopologies) AsSet() map[string]ElasticsearchTopology
type ElasticsearchTopology ¶
type ElasticsearchTopology struct {
InstanceConfigurationId *string `tfsdk:"instance_configuration_id"`
LatestInstanceConfigurationId *string `tfsdk:"latest_instance_configuration_id"`
InstanceConfigurationVersion *int `tfsdk:"instance_configuration_version"`
LatestInstanceConfigurationVersion *int `tfsdk:"latest_instance_configuration_version"`
Size *string `tfsdk:"size"`
SizeResource *string `tfsdk:"size_resource"`
ZoneCount int `tfsdk:"zone_count"`
NodeTypeData *string `tfsdk:"node_type_data"`
NodeTypeMaster *string `tfsdk:"node_type_master"`
NodeTypeIngest *string `tfsdk:"node_type_ingest"`
NodeTypeMl *string `tfsdk:"node_type_ml"`
NodeRoles []string `tfsdk:"node_roles"`
Autoscaling *ElasticsearchTopologyAutoscaling `tfsdk:"autoscaling"`
// contains filtered or unexported fields
}
func CreateTierForTest ¶
func CreateTierForTest(tierId string, tier ElasticsearchTopology) *ElasticsearchTopology
func (*ElasticsearchTopology) HasNodeTypes ¶ added in v0.10.0
func (topology *ElasticsearchTopology) HasNodeTypes() bool
type ElasticsearchTopologyAutoscaling ¶
type ElasticsearchTopologyAutoscaling v1.ElasticsearchTopologyAutoscaling
type ElasticsearchTopologyTF ¶
type ElasticsearchTopologyTF struct {
InstanceConfigurationId types.String `tfsdk:"instance_configuration_id"`
LatestInstanceConfigurationId types.String `tfsdk:"latest_instance_configuration_id"`
InstanceConfigurationVersion types.Int64 `tfsdk:"instance_configuration_version"`
LatestInstanceConfigurationVersion types.Int64 `tfsdk:"latest_instance_configuration_version"`
Size types.String `tfsdk:"size"`
SizeResource types.String `tfsdk:"size_resource"`
ZoneCount types.Int64 `tfsdk:"zone_count"`
NodeTypeData types.String `tfsdk:"node_type_data"`
NodeTypeMaster types.String `tfsdk:"node_type_master"`
NodeTypeIngest types.String `tfsdk:"node_type_ingest"`
NodeTypeMl types.String `tfsdk:"node_type_ml"`
NodeRoles types.Set `tfsdk:"node_roles"`
Autoscaling types.Object `tfsdk:"autoscaling"`
}
func (*ElasticsearchTopologyTF) HasNodeTypes ¶ added in v0.10.0
func (topology *ElasticsearchTopologyTF) HasNodeTypes() bool
type ElasticsearchTrustAccounts ¶
type ElasticsearchTrustAccounts v1.ElasticsearchTrustAccounts
type ElasticsearchTrustExternals ¶
type ElasticsearchTrustExternals v1.ElasticsearchTrustExternals
type PlanModifierResponse ¶ added in v0.8.0
type PlanModifierResponse interface {
planmodifier.StringResponse | planmodifier.Int64Response
}
Source Files
¶
- cloud_id_plan_modifier.go
- elasticsearch_config.go
- elasticsearch_extension.go
- elasticsearch_keystore_contents.go
- elasticsearch_payload.go
- elasticsearch_read.go
- elasticsearch_remote_cluster.go
- elasticsearch_snapshot.go
- elasticsearch_snapshot_source.go
- elasticsearch_test_utils.go
- elasticsearch_topology.go
- elasticsearch_trust_account.go
- elasticsearch_trust_external.go
- node_roles.go
- node_roles_plan_modifier.go
- node_roles_validator.go
- node_types_plan_modifier.go
- node_types_validator.go
- schema.go
- topology_plan_modifier.go
Click to show internal directories.
Click to hide internal directories.