Documentation ¶
Index ¶
- Constants
- Variables
- func ClusterAdvancedConfigurationSchema() *schema.Schema
- func ClusterAdvancedConfigurationSchemaComputed() *schema.Schema
- func ClusterConnectionStringsSchema() *schema.Schema
- func ContainsLabelOrKey(list []matlas.Label, item matlas.Label) bool
- func DataSource() *schema.Resource
- func ExpandBiConnectorConfig(d *schema.ResourceData) (*matlas.BiConnector, error)
- func ExpandLabelSliceFromSetSchema(d *schema.ResourceData) []matlas.Label
- func ExpandProcessArgs(d *schema.ResourceData, p map[string]any) *matlas.ProcessArgs
- func ExpandTagSliceFromSetSchema(d *schema.ResourceData) []*matlas.Tag
- func FlattenBiConnectorConfig(biConnector *matlas.BiConnector) []any
- func FlattenConnectionStrings(connectionStrings *matlas.ConnectionStrings) []map[string]any
- func FlattenLabels(l []matlas.Label) []map[string]any
- func FlattenProcessArgs(p *matlas.ProcessArgs) []any
- func FlattenTags(l *[]*matlas.Tag) []map[string]any
- func FormatMongoDBMajorVersion(val any) string
- func HashCodeString(s string) int
- func HashFunctionForKeyValuePair(v any) int
- func IsSharedTier(instanceSize string) bool
- func MigrateBIConnectorConfig(rawState map[string]any) map[string]any
- func PluralDataSource() *schema.Resource
- func RemoveLabel(list []matlas.Label, item matlas.Label) []matlas.Label
- func Resource() *schema.Resource
- func ResourceClusterListAdvancedRefreshFunc(ctx context.Context, projectID string, client ClusterService) retry.StateRefreshFunc
- func ResourceClusterRefreshFunc(ctx context.Context, name, projectID string, client ClusterService) retry.StateRefreshFunc
- func ResourceV0() *schema.Resource
- func StringIsUppercase() schema.SchemaValidateDiagFunc
- func UpgradeCluster(ctx context.Context, conn *matlas.Client, request *matlas.Cluster, ...) (*matlas.Cluster, *matlas.Response, error)
- type ClusterService
- type ClusterServiceFromClient
- func (a *ClusterServiceFromClient) Get(ctx context.Context, groupID, clusterName string) (*matlas.Cluster, *matlas.Response, error)
- func (a *ClusterServiceFromClient) GetAdvancedCluster(ctx context.Context, groupID, clusterName string) (*matlas.AdvancedCluster, *matlas.Response, error)
- func (a *ClusterServiceFromClient) List(ctx context.Context, groupID string, options *matlas.ListOptions) (*matlas.AdvancedClustersResponse, *matlas.Response, error)
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 DataSource ¶
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 FlattenProcessArgs ¶
func FlattenProcessArgs(p *matlas.ProcessArgs) []any
func HashCodeString ¶
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 IsSharedTier ¶
func PluralDataSource ¶
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 StringIsUppercase ¶ added in v1.15.0
func StringIsUppercase() schema.SchemaValidateDiagFunc
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) 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
func (a *ClusterServiceFromClient) List(ctx context.Context, groupID string, options *matlas.ListOptions) (*matlas.AdvancedClustersResponse, *matlas.Response, error)
Click to show internal directories.
Click to hide internal directories.