mongodbatlas

package
v1.13.1-pre Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MPL-2.0 Imports: 77 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeprecationMessageParameterToResource = "this parameter is deprecated and will be removed in %s, please transition to %s"
	DeprecationByDateMessageParameter     = "this parameter is deprecated and will be removed by %s"
	DeprecationByDateWithReplacement      = "this parameter is deprecated and will be removed by %s, please transition to %s"
	DeprecationByVersionMessageParameter  = "this parameter is deprecated and will be removed in version %s"
	DeprecationMessage                    = "this resource is deprecated and will be removed in %s, please transition to %s"

	MissingAuthAttrError = "either Atlas Programmatic API Keys or AWS Secrets Manager attributes must be set"
	ProviderConfigError  = "error in configuring the provider."
	AWS                  = "AWS"
	AZURE                = "AZURE"
	GCP
)
View Source
const (
	AtlasUserDataSourceName = "atlas_user"
)
View Source
const (
	AtlasUsersDataSourceName = "atlas_users"
)
View Source
const MongodbGovCloudURL = "https://cloud.mongodbgov.com"
View Source
const ToolName = "terraform-provider-mongodbatlas"

Variables

View Source
var AssumeRoleType = types.ObjectType{AttrTypes: map[string]attr.Type{
	"policy_arns":         types.SetType{ElemType: types.StringType},
	"transitive_tag_keys": types.SetType{ElemType: types.StringType},
	"tags":                types.MapType{ElemType: types.StringType},
	"duration":            types.StringType,
	"external_id":         types.StringType,
	"policy":              types.StringType,
	"role_arn":            types.StringType,
	"session_name":        types.StringType,
	"source_identity":     types.StringType,
}}
View Source
var LabelObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{
	"key":   types.StringType,
	"value": types.StringType,
}}
View Source
var (
	ProviderEnableBeta, _ = strconv.ParseBool(os.Getenv("MONGODB_ATLAS_ENABLE_BETA"))
)
View Source
var RoleObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{
	"role_name":       types.StringType,
	"collection_name": types.StringType,
	"database_name":   types.StringType,
}}
View Source
var ScopeObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{
	"name": types.StringType,
	"type": types.StringType,
}}
View Source
var SpecObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{
	"instance_size": types.StringType,
	"node_count":    types.Int64Type,
}}

Functions

func FindRole added in v0.9.0

func FindRole(ctx context.Context, conn *matlas.Client, projectID, roleID string) (*matlas.CloudProviderAccessRole, error)

func HashCodeString added in v1.0.0

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 added in v1.12.0

func HashFunctionForKeyValuePair(v any) int

func MultiEnvDefaultFunc added in v1.12.0

func MultiEnvDefaultFunc(ks []string, def any) any

func MuxedProviderFactory added in v1.12.0

func MuxedProviderFactory() func() tfprotov6.ProviderServer

func NewAlertConfigurationDS added in v1.12.0

func NewAlertConfigurationDS() datasource.DataSource

func NewAlertConfigurationRS added in v1.12.0

func NewAlertConfigurationRS() resource.Resource

func NewAlertConfigurationsDS added in v1.12.0

func NewAlertConfigurationsDS() datasource.DataSource

func NewAtlasUserDS added in v1.12.0

func NewAtlasUserDS() datasource.DataSource

func NewAtlasUsersDS added in v1.12.0

func NewAtlasUsersDS() datasource.DataSource

func NewDatabaseUserDS added in v1.12.0

func NewDatabaseUserDS() datasource.DataSource

func NewDatabaseUserRS added in v1.12.0

func NewDatabaseUserRS() resource.Resource

func NewDatabaseUsersDS added in v1.12.0

func NewDatabaseUsersDS() datasource.DataSource

func NewEncryptionAtRestRS added in v1.12.0

func NewEncryptionAtRestRS() resource.Resource

func NewFrameworkProvider added in v1.12.0

func NewFrameworkProvider() provider.Provider

func NewProjectDS added in v1.12.0

func NewProjectDS() datasource.DataSource

func NewProjectIPAccessListDS added in v1.12.0

func NewProjectIPAccessListDS() datasource.DataSource

func NewProjectIPAccessListRS added in v1.12.0

func NewProjectIPAccessListRS() resource.Resource

func NewProjectRS added in v1.12.0

func NewProjectRS() resource.Resource

func NewProjectsDS added in v1.12.0

func NewProjectsDS() datasource.DataSource

func NewSdkV2Provider added in v1.12.0

func NewSdkV2Provider() *schema.Provider

NewSdkV2Provider returns the provider to be use by the code.

func NewSearchDeploymentDS added in v1.13.0

func NewSearchDeploymentDS() datasource.DataSource

func NewSearchDeploymentRS added in v1.13.0

func NewSearchDeploymentRS() resource.Resource

Types

type APIProjectAssignmentKeyInput added in v1.10.0

type APIProjectAssignmentKeyInput struct {
	ProjectID string   `json:"desc,omitempty"`
	RoleNames []string `json:"roles,omitempty"`
}

func ExpandProjectAssignmentSet added in v1.10.0

func ExpandProjectAssignmentSet(projectAssignments *schema.Set) []*APIProjectAssignmentKeyInput

type AlertConfigurationDS added in v1.12.0

type AlertConfigurationDS struct {
	DSCommon
}

func (*AlertConfigurationDS) Read added in v1.12.0

func (*AlertConfigurationDS) Schema added in v1.12.0

type AlertConfigurationRS added in v1.12.0

type AlertConfigurationRS struct {
	RSCommon
}

func (*AlertConfigurationRS) Create added in v1.12.0

func (*AlertConfigurationRS) Delete added in v1.12.0

func (*AlertConfigurationRS) ImportState added in v1.12.0

func (*AlertConfigurationRS) Read added in v1.12.0

func (*AlertConfigurationRS) Schema added in v1.12.0

func (*AlertConfigurationRS) Update added in v1.12.0

type AlertConfigurationsDS added in v1.12.0

type AlertConfigurationsDS struct {
	DSCommon
}

func (*AlertConfigurationsDS) Read added in v1.12.0

func (*AlertConfigurationsDS) Schema added in v1.12.0

type AssumeRole added in v1.7.0

type AssumeRole struct {
	Tags              map[string]string
	RoleARN           string
	ExternalID        string
	Policy            string
	SessionName       string
	SourceIdentity    string
	PolicyARNs        []string
	TransitiveTagKeys []string
	Duration          time.Duration
}

type AtlasUserDS added in v1.12.0

type AtlasUserDS struct {
	DSCommon
}

func (*AtlasUserDS) Read added in v1.12.0

func (*AtlasUserDS) Schema added in v1.12.0

type AtlasUsersDS added in v1.12.0

type AtlasUsersDS struct {
	DSCommon
}

func (*AtlasUsersDS) Read added in v1.12.0

func (*AtlasUsersDS) Schema added in v1.12.0

type AtlastProjectDependents added in v1.3.1

type AtlastProjectDependents struct {
	AdvancedClusters *matlas.AdvancedClustersResponse
}

Resources that need to be cleaned up before a project can be deleted

type Config

type Config struct {
	AssumeRole   *AssumeRole
	PublicKey    string
	PrivateKey   string
	BaseURL      string
	RealmBaseURL string
}

Config contains the configurations needed to use SDKs

func (*Config) NewClient

func (c *Config) NewClient(ctx context.Context) (any, error)

NewClient func...

type DSCommon added in v1.12.0

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

DSCommon is used as an embedded struct for all framework data sources. Implements the following plugin-framework defined functions: - Metadata - Configure client is left empty and populated by the framework when envoking Configure method. dataSourceName must be defined when creating an instance of a data source.

func (*DSCommon) Configure added in v1.12.0

func (*DSCommon) Metadata added in v1.12.0

type DatabaseUserDS added in v1.12.0

type DatabaseUserDS struct {
	DSCommon
}

func (*DatabaseUserDS) Read added in v1.12.0

func (*DatabaseUserDS) Schema added in v1.12.0

type DatabaseUserRS added in v1.12.0

type DatabaseUserRS struct {
	RSCommon
}

func (*DatabaseUserRS) Create added in v1.12.0

func (*DatabaseUserRS) Delete added in v1.12.0

func (*DatabaseUserRS) ImportState added in v1.12.0

func (*DatabaseUserRS) Read added in v1.12.0

func (*DatabaseUserRS) Schema added in v1.12.0

func (*DatabaseUserRS) Update added in v1.12.0

type DatabaseUsersDS added in v1.12.0

type DatabaseUsersDS struct {
	DSCommon
}

func (*DatabaseUsersDS) Read added in v1.12.0

func (*DatabaseUsersDS) Schema added in v1.12.0

type EncryptionAtRestRS added in v1.12.0

type EncryptionAtRestRS struct {
	RSCommon
}

func (*EncryptionAtRestRS) Create added in v1.12.0

func (*EncryptionAtRestRS) Delete added in v1.12.0

func (*EncryptionAtRestRS) ImportState added in v1.12.0

func (*EncryptionAtRestRS) Read added in v1.12.0

func (*EncryptionAtRestRS) Schema added in v1.12.0

func (*EncryptionAtRestRS) Update added in v1.12.0

type MongoDBClient added in v1.0.0

type MongoDBClient struct {
	Atlas   *matlasClient.Client
	AtlasV2 *atlasSDK.APIClient
	Config  *Config
}

MongoDBClient contains the mongodbatlas clients and configurations

func (*MongoDBClient) GetRealmClient added in v1.0.1

func (c *MongoDBClient) GetRealmClient(ctx context.Context) (*realm.Client, error)

type MongodbtlasProvider added in v1.12.0

type MongodbtlasProvider struct{}

func (*MongodbtlasProvider) Configure added in v1.12.0

func (*MongodbtlasProvider) DataSources added in v1.12.0

func (p *MongodbtlasProvider) DataSources(context.Context) []func() datasource.DataSource

func (*MongodbtlasProvider) Metadata added in v1.12.0

func (*MongodbtlasProvider) Resources added in v1.12.0

func (p *MongodbtlasProvider) Resources(context.Context) []func() resource.Resource

func (*MongodbtlasProvider) Schema added in v1.12.0

type ProjectDS added in v1.12.0

type ProjectDS struct {
	DSCommon
}

func (*ProjectDS) Read added in v1.12.0

func (*ProjectDS) Schema added in v1.12.0

type ProjectIPAccessListDS added in v1.12.0

type ProjectIPAccessListDS struct {
	DSCommon
}

func (*ProjectIPAccessListDS) Read added in v1.12.0

func (*ProjectIPAccessListDS) Schema added in v1.12.0

type ProjectIPAccessListRS added in v1.12.0

type ProjectIPAccessListRS struct {
	RSCommon
}

func (*ProjectIPAccessListRS) Create added in v1.12.0

func (*ProjectIPAccessListRS) Delete added in v1.12.0

func (*ProjectIPAccessListRS) ImportState added in v1.12.0

func (*ProjectIPAccessListRS) Read added in v1.12.0

func (*ProjectIPAccessListRS) Schema added in v1.12.0

func (*ProjectIPAccessListRS) Update added in v1.12.0

Update is not supported

type ProjectRS added in v1.12.0

type ProjectRS struct {
	RSCommon
}

func (*ProjectRS) Create added in v1.12.0

func (*ProjectRS) Delete added in v1.12.0

func (*ProjectRS) ImportState added in v1.12.0

func (*ProjectRS) Read added in v1.12.0

func (*ProjectRS) Schema added in v1.12.0

func (*ProjectRS) Update added in v1.12.0

type ProjectsDS added in v1.12.0

type ProjectsDS struct {
	DSCommon
}

func (*ProjectsDS) Read added in v1.12.0

func (*ProjectsDS) Schema added in v1.12.0

type RSCommon added in v1.12.0

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

RSCommon is used as an embedded struct for all framework resources. Implements the following plugin-framework defined functions: - Metadata - Configure client is left empty and populated by the framework when envoking Configure method. resourceName must be defined when creating an instance of a resource.

func (*RSCommon) Configure added in v1.12.0

func (*RSCommon) Metadata added in v1.12.0

type SearchDeploymentDS added in v1.13.0

type SearchDeploymentDS struct {
	DSCommon
}

func (*SearchDeploymentDS) Read added in v1.13.0

func (*SearchDeploymentDS) Schema added in v1.13.0

type SearchDeploymentRS added in v1.13.0

type SearchDeploymentRS struct {
	RSCommon
}

func (*SearchDeploymentRS) Create added in v1.13.0

func (*SearchDeploymentRS) Delete added in v1.13.0

func (*SearchDeploymentRS) ImportState added in v1.13.0

func (*SearchDeploymentRS) Read added in v1.13.0

func (*SearchDeploymentRS) Schema added in v1.13.0

func (*SearchDeploymentRS) Update added in v1.13.0

type SecretData added in v1.7.0

type SecretData struct {
	PublicKey  string `json:"public_key"`
	PrivateKey string `json:"private_key"`
}

Source Files

Directories

Path Synopsis
framework

Jump to

Keyboard shortcuts

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