v2

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAvailableMigration added in v0.10.0

func CheckAvailableMigration(ctx context.Context, plan types.Object, state types.Object) (bool, diag.Diagnostics)

func CompatibleWithNodeRoles

func CompatibleWithNodeRoles(version string) (bool, error)

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 ElasticsearchRemoteClusterSchema

func ElasticsearchRemoteClusterSchema() schema.Attribute

func ElasticsearchRemoteClustersPayload

func ElasticsearchRemoteClustersPayload(ctx context.Context, clustersTF types.Set) (*models.RemoteResources, diag.Diagnostics)

func ElasticsearchSchema

func ElasticsearchSchema() schema.Attribute

func ElasticsearchSnapshotSourceSchema added in v0.10.0

func ElasticsearchSnapshotSourceSchema() schema.Attribute

func ElasticsearchTopologyAttrs added in v0.11.0

func ElasticsearchTopologyAttrs() map[string]attr.Type

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 PlanHasNodeTypes(ctx context.Context, planElasticsearch types.Object) (bool, diag.Diagnostics)

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 UseNodeRoles(ctx context.Context, stateVersion, planVersion types.String, planElasticsearch types.Object) (bool, diag.Diagnostics)

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:

  1. The deployment template attribute has changed
  2. `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 VersionSupportsNodeRoles() validator.Set

func VersionSupportsNodeTypes added in v0.9.0

func VersionSupportsNodeTypes() validator.String

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 (*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 ElasticsearchKeystoreContents struct {
	Value  string `tfsdk:"value"`
	AsFile *bool  `tfsdk:"as_file"`
}

type ElasticsearchKeystoreContentsTF added in v0.9.0

type ElasticsearchKeystoreContentsTF struct {
	Value  types.String `tfsdk:"value"`
	AsFile types.Bool   `tfsdk:"as_file"`
}

type ElasticsearchRemoteCluster

type ElasticsearchRemoteCluster struct {
	DeploymentId    *string `tfsdk:"deployment_id"`
	Alias           *string `tfsdk:"alias"`
	RefId           *string `tfsdk:"ref_id"`
	SkipUnavailable *bool   `tfsdk:"skip_unavailable"`
}

type ElasticsearchRemoteClusterTF

type ElasticsearchRemoteClusterTF struct {
	DeploymentId    types.String `tfsdk:"deployment_id"`
	Alias           types.String `tfsdk:"alias"`
	RefId           types.String `tfsdk:"ref_id"`
	SkipUnavailable types.Bool   `tfsdk:"skip_unavailable"`
}

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 ElasticsearchSnapshotRepositoryInfoTF struct {
	Reference types.Object `tfsdk:"reference"` //< ElasticsearchSnapshotRepositoryReference
}

type ElasticsearchSnapshotRepositoryReference added in v0.7.0

type ElasticsearchSnapshotRepositoryReference struct {
	RepositoryName string `tfsdk:"repository_name"`
}

type ElasticsearchSnapshotRepositoryReferenceTF added in v0.10.0

type ElasticsearchSnapshotRepositoryReferenceTF struct {
	RepositoryName types.String `tfsdk:"repository_name"`
}

type ElasticsearchSnapshotSource

type ElasticsearchSnapshotSource v1.ElasticsearchSnapshotSource

type ElasticsearchSnapshotTF added in v0.8.0

type ElasticsearchSnapshotTF struct {
	Enabled    bool         `tfsdk:"enabled"`
	Repository types.Object `tfsdk:"repository"` //< ElasticsearchSnapshotRepositoryInfo
}

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

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
}

Jump to

Keyboard shortcuts

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