advancedcluster

package
v1.15.1-pre Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorClusterSetting            = "error setting `%s` for MongoDB Cluster (%s): %s"
	ErrorAdvancedConfRead          = "error reading Advanced Configuration Option form MongoDB Cluster (%s): %s"
	ErrorClusterAdvancedSetting    = "error setting `%s` for MongoDB ClusterAdvanced (%s): %s"
	ErrorAdvancedClusterListStatus = "error awaiting MongoDB ClusterAdvanced List IDLE: %s"
)

Variables

View Source
var (
	DefaultLabel = matlas.Label{Key: "Infrastructure Tool", Value: "MongoDB Atlas Terraform Provider"}
	DSTagsSchema = schema.Schema{
		Type:     schema.TypeSet,
		Computed: true,
		Elem: &schema.Resource{
			Schema: map[string]*schema.Schema{
				"key": {
					Type:     schema.TypeString,
					Computed: true,
				},
				"value": {
					Type:     schema.TypeString,
					Computed: true,
				},
			},
		},
	}
	RSTagsSchema = schema.Schema{
		Type:     schema.TypeSet,
		Optional: true,
		Elem: &schema.Resource{
			Schema: map[string]*schema.Schema{
				"key": {
					Type:     schema.TypeString,
					Required: true,
				},
				"value": {
					Type:     schema.TypeString,
					Required: true,
				},
			},
		},
	}
)

Functions

func ClusterAdvancedConfigurationSchema

func ClusterAdvancedConfigurationSchema() *schema.Schema

func ClusterAdvancedConfigurationSchemaComputed

func ClusterAdvancedConfigurationSchemaComputed() *schema.Schema

func ClusterConnectionStringsSchema

func ClusterConnectionStringsSchema() *schema.Schema

func ContainsLabelOrKey

func ContainsLabelOrKey(list []matlas.Label, item matlas.Label) bool

func DataSource

func DataSource() *schema.Resource

func ExpandBiConnectorConfig

func ExpandBiConnectorConfig(d *schema.ResourceData) (*matlas.BiConnector, error)

func ExpandLabelSliceFromSetSchema

func ExpandLabelSliceFromSetSchema(d *schema.ResourceData) []matlas.Label

func ExpandProcessArgs

func ExpandProcessArgs(d *schema.ResourceData, p map[string]any) *matlas.ProcessArgs

func ExpandTagSliceFromSetSchema

func ExpandTagSliceFromSetSchema(d *schema.ResourceData) []*matlas.Tag

func FlattenBiConnectorConfig

func FlattenBiConnectorConfig(biConnector *matlas.BiConnector) []any

func FlattenConnectionStrings

func FlattenConnectionStrings(connectionStrings *matlas.ConnectionStrings) []map[string]any

func FlattenLabels

func FlattenLabels(l []matlas.Label) []map[string]any

func FlattenProcessArgs

func FlattenProcessArgs(p *matlas.ProcessArgs) []any

func FlattenTags

func FlattenTags(l *[]*matlas.Tag) []map[string]any

func FormatMongoDBMajorVersion

func FormatMongoDBMajorVersion(val any) string

func HashCodeString

func HashCodeString(s string) int

HashCodeString hashes a string to a unique hashcode.

crc32 returns a uint32, but for our use we need and non negative integer. Here we cast to an integer and invert it if the result is negative.

func HashFunctionForKeyValuePair

func HashFunctionForKeyValuePair(v any) int

func IsSharedTier

func IsSharedTier(instanceSize string) bool

func MigrateBIConnectorConfig

func MigrateBIConnectorConfig(rawState map[string]any) map[string]any

func PluralDataSource

func PluralDataSource() *schema.Resource

func RemoveLabel

func RemoveLabel(list []matlas.Label, item matlas.Label) []matlas.Label

func Resource

func Resource() *schema.Resource

func ResourceClusterListAdvancedRefreshFunc

func ResourceClusterListAdvancedRefreshFunc(ctx context.Context, projectID string, client ClusterService) retry.StateRefreshFunc

func ResourceClusterRefreshFunc

func ResourceClusterRefreshFunc(ctx context.Context, name, projectID string, client ClusterService) retry.StateRefreshFunc

func ResourceV0

func ResourceV0() *schema.Resource

func StringIsUppercase added in v1.15.0

func StringIsUppercase() schema.SchemaValidateDiagFunc

func UpgradeCluster

func UpgradeCluster(ctx context.Context, conn *matlas.Client, request *matlas.Cluster, projectID, name string, timeout time.Duration) (*matlas.Cluster, *matlas.Response, error)

Types

type ClusterService added in v1.15.0

type ClusterService interface {
	Get(ctx context.Context, groupID, clusterName string) (*matlas.Cluster, *matlas.Response, error)
	List(ctx context.Context, groupID string, options *matlas.ListOptions) (*matlas.AdvancedClustersResponse, *matlas.Response, error)
	GetAdvancedCluster(ctx context.Context, groupID, clusterName string) (*matlas.AdvancedCluster, *matlas.Response, error)
}

func ServiceFromClient added in v1.15.0

func ServiceFromClient(client *matlas.Client) ClusterService

type ClusterServiceFromClient added in v1.15.0

type ClusterServiceFromClient struct {
	// contains filtered or unexported fields
}

func (*ClusterServiceFromClient) Get added in v1.15.0

func (a *ClusterServiceFromClient) Get(ctx context.Context, groupID, clusterName string) (*matlas.Cluster, *matlas.Response, error)

func (*ClusterServiceFromClient) GetAdvancedCluster added in v1.15.0

func (a *ClusterServiceFromClient) GetAdvancedCluster(ctx context.Context, groupID, clusterName string) (*matlas.AdvancedCluster, *matlas.Response, error)

func (*ClusterServiceFromClient) List added in v1.15.0

Jump to

Keyboard shortcuts

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