Documentation ¶
Index ¶
- Constants
- Variables
- func CheckClusterDestroy(s *terraform.State) error
- func CheckDatabaseUserAttributes(dbUser *admin.CloudDatabaseUser, username string) resource.TestCheckFunc
- func CheckDatabaseUserExists(resourceName string, dbUser *admin.CloudDatabaseUser) resource.TestCheckFunc
- func CheckDestroyDatabaseUser(s *terraform.State) error
- func CheckDestroyFederatedDatabaseInstance(s *terraform.State) error
- func CheckDestroyLDAPConfiguration(s *terraform.State) error
- func CheckDestroyNetworkPeering(s *terraform.State) error
- func CheckDestroyOrgInvitation(s *terraform.State) error
- func CheckDestroyProject(s *terraform.State) error
- func CheckDestroyProjectIPAccessList(s *terraform.State) error
- func CheckDestroySearchIndex(state *terraform.State) error
- func CheckDestroyStreamInstance(state *terraform.State) error
- func CheckDestroyTeam(s *terraform.State) error
- func CheckDestroyTeamAdvancedCluster(s *terraform.State) error
- func CheckProjectAttributes(project *admin.Group, projectName string) resource.TestCheckFunc
- func CheckProjectExists(resourceName string, project *admin.Group) resource.TestCheckFunc
- func CheckProjectIPAccessListExists(resourceName string) resource.TestCheckFunc
- func ConfigClusterGlobal(resourceName, orgID, projectName, name, backupEnabled string) string
- func ConfigDatabaseUserBasic(projectName, orgID, roleName, username, keyLabel, valueLabel string) string
- func ConfigDatabaseUserWithAWSIAMType(projectName, orgID, roleName, username, keyLabel, valueLabel string) string
- func ConfigDatabaseUserWithLDAPAuthType(projectName, orgID, roleName, username, keyLabel, valueLabel string) string
- func ConfigDatabaseUserWithLabels(projectName, orgID, roleName, username string, labels []admin.ComponentLabel) string
- func ConfigDatabaseUserWithRoles(username, password, projectName, orgID string, ...) string
- func ConfigDatabaseUserWithScopes(username, password, roleName, projectName, orgID string, ...) string
- func ConfigDatabaseUserWithX509Type(projectName, orgID, roleName, username, keyLabel, valueLabel, x509Type string) string
- func ConfigProject(projectName, orgID string, teams []*admin.TeamRole) string
- func ConfigProjectGovWithOwner(projectName, orgID, projectOwnerID string) string
- func ConfigProjectIPAccessListWithAWSSecurityGroup(...) string
- func ConfigProjectIPAccessListWithCIDRBlock(orgID, projectName, cidrBlock, comment string) string
- func ConfigProjectIPAccessListWithIPAddress(orgID, projectName, ipAddress, comment string) string
- func ConfigProjectIPAccessListWithMultiple(projectName, orgID string, accessList []map[string]string, isUpdate bool) string
- func ConfigProjectWithFalseDefaultSettings(projectName, orgID, projectOwnerID string) string
- func ConfigProjectWithLimits(projectName, orgID string, limits []*admin.DataFederationLimit) string
- func ConfigProjectWithOwner(projectName, orgID, projectOwnerID string) string
- func ConfigProjectWithSettings(projectName, orgID, projectOwnerID string, value bool) string
- func ConfigProjectWithUpdatedRole(projectName, orgID, teamID, roleName string) string
- func ConfigServerlessInstanceBasic(orgID, projectName, name string, ignoreConnectionStrings bool) string
- func ConfigServerlessInstanceWithTags(orgID, projectName, name string, tags []matlas.Tag) string
- func Conn() *matlas.Client
- func ConnV2() *admin.APIClient
- func DebugPlan() plancheck.PlanCheck
- func ExternalProviders(versionAtlasProvider string) map[string]resource.ExternalProvider
- func ExternalProvidersOnlyAWS() map[string]resource.ExternalProvider
- func ExternalProvidersWithAWS(versionAtlasProvider string) map[string]resource.ExternalProvider
- func GetProjectTeamsIdsWithPos(pos int) string
- func ImportStateClusterIDFunc(resourceName string) resource.ImportStateIdFunc
- func ImportStateProjecIPAccessListtIDFunc(resourceName string) resource.ImportStateIdFunc
- func ImportStateProjectIDFunc(resourceName string) resource.ImportStateIdFunc
- func IntGreatThan(value int) resource.CheckResourceAttrWithFunc
- func JSONEquals(expected string) resource.CheckResourceAttrWithFunc
- func MatchesExpression(expr string) resource.CheckResourceAttrWithFunc
- func PreCheck(tb testing.TB)
- func PreCheckAtlasUsername(tb testing.TB)
- func PreCheckAwsEnv(tb testing.TB)
- func PreCheckBasic(tb testing.TB)
- func PreCheckBasicOwnerID(tb testing.TB)
- func PreCheckBetaFlag(tb testing.TB)
- func PreCheckCert(tb testing.TB)
- func PreCheckCloudProviderAccessAzure(tb testing.TB)
- func PreCheckDataLakePipelineRun(tb testing.TB)
- func PreCheckDataLakePipelineRuns(tb testing.TB)
- func PreCheckEncryptionAtRestEnvAzure(tb testing.TB)
- func PreCheckFederatedSettings(tb testing.TB)
- func PreCheckGPCEnv(tb testing.TB)
- func PreCheckGov(tb testing.TB)
- func PreCheckLDAP(tb testing.TB)
- func PreCheckPeeringEnvAWS(tb testing.TB)
- func PreCheckPeeringEnvAzure(tb testing.TB)
- func PreCheckPeeringEnvGCP(tb testing.TB)
- func PreCheckPrivateEndpointServiceDataFederationOnlineArchiveRun(tb testing.TB)
- func PreCheckProjectTeamsIdsWithMinCount(tb testing.TB, minTeamsCount int)
- func PreCheckRegularCredsAreEmpty(tb testing.TB)
- func PreCheckS3Bucket(tb testing.TB)
- func PreCheckSTSAssumeRole(tb testing.TB)
- func SkipTestForCI(tb testing.TB)
- func StreamInstanceConfig(orgID, projectName, instanceName, region, cloudProvider string) string
- type ClusterInfo
Constants ¶
View Source
const (
// Provider name for single configuration testing
ProviderNameMongoDBAtlas = "mongodbatlas"
)
Variables ¶
View Source
var ( ClusterTagsMap1 = map[string]string{ "key": "key 1", "value": "value 1", } ClusterTagsMap2 = map[string]string{ "key": "key 2", "value": "value 2", } ClusterTagsMap3 = map[string]string{ "key": "key 3", "value": "value 3", } )
View Source
var MongoDBClient *config.MongoDBClient
MongoDBClient is used to configure client required for Framework-based acceptance tests.
View Source
var TestAccProviderV6Factories map[string]func() (tfprotov6.ProviderServer, error)
TestAccProviderV6Factories is used in all tests for ProtoV6ProviderFactories.
Functions ¶
func CheckClusterDestroy ¶
func CheckDatabaseUserAttributes ¶
func CheckDatabaseUserAttributes(dbUser *admin.CloudDatabaseUser, username string) resource.TestCheckFunc
func CheckDatabaseUserExists ¶
func CheckDatabaseUserExists(resourceName string, dbUser *admin.CloudDatabaseUser) resource.TestCheckFunc
func CheckDestroyProject ¶
func CheckDestroySearchIndex ¶
func CheckDestroyTeam ¶
func CheckProjectAttributes ¶
func CheckProjectAttributes(project *admin.Group, projectName string) resource.TestCheckFunc
func CheckProjectExists ¶
func CheckProjectExists(resourceName string, project *admin.Group) resource.TestCheckFunc
func CheckProjectIPAccessListExists ¶
func CheckProjectIPAccessListExists(resourceName string) resource.TestCheckFunc
func ConfigClusterGlobal ¶
func ConfigDatabaseUserBasic ¶
func ConfigDatabaseUserWithLabels ¶
func ConfigDatabaseUserWithLabels(projectName, orgID, roleName, username string, labels []admin.ComponentLabel) string
func ConfigDatabaseUserWithRoles ¶
func ConfigDatabaseUserWithRoles(username, password, projectName, orgID string, rolesArr []*admin.DatabaseUserRole) string
func ConfigProjectWithLimits ¶
func ConfigProjectWithLimits(projectName, orgID string, limits []*admin.DataFederationLimit) string
func ConfigProjectWithOwner ¶
func ConfigProjectWithSettings ¶ added in v1.15.0
func ExternalProviders ¶ added in v1.15.0
func ExternalProviders(versionAtlasProvider string) map[string]resource.ExternalProvider
func ExternalProvidersOnlyAWS ¶ added in v1.15.0
func ExternalProvidersOnlyAWS() map[string]resource.ExternalProvider
func ExternalProvidersWithAWS ¶ added in v1.15.0
func ExternalProvidersWithAWS(versionAtlasProvider string) map[string]resource.ExternalProvider
func ImportStateClusterIDFunc ¶
func ImportStateClusterIDFunc(resourceName string) resource.ImportStateIdFunc
func ImportStateProjecIPAccessListtIDFunc ¶
func ImportStateProjecIPAccessListtIDFunc(resourceName string) resource.ImportStateIdFunc
func ImportStateProjectIDFunc ¶
func ImportStateProjectIDFunc(resourceName string) resource.ImportStateIdFunc
func IntGreatThan ¶
func IntGreatThan(value int) resource.CheckResourceAttrWithFunc
func JSONEquals ¶
func JSONEquals(expected string) resource.CheckResourceAttrWithFunc
func MatchesExpression ¶
func MatchesExpression(expr string) resource.CheckResourceAttrWithFunc
func PreCheckAtlasUsername ¶
func PreCheckAwsEnv ¶
func PreCheckBasic ¶
func PreCheckBasicOwnerID ¶
func PreCheckBetaFlag ¶
func PreCheckCert ¶ added in v1.15.1
func PreCheckGPCEnv ¶
func PreCheckGov ¶
func PreCheckLDAP ¶
func PreCheckPeeringEnvAWS ¶
func PreCheckPeeringEnvAzure ¶
func PreCheckPeeringEnvGCP ¶
func PreCheckS3Bucket ¶ added in v1.15.0
func PreCheckSTSAssumeRole ¶
func SkipTestForCI ¶
SkipTestForCI is added to tests that cannot run as part of CI, e.g. in Github actions.
func StreamInstanceConfig ¶
Types ¶
type ClusterInfo ¶
type ClusterInfo struct { ProjectIDStr string ClusterName string ClusterNameStr string ClusterTerraformStr string }
func GetClusterInfo ¶
func GetClusterInfo(orgID string) ClusterInfo
GetClusterInfo is used to obtain a project and cluster configuration resource. When `MONGODB_ATLAS_CLUSTER_NAME` and `MONGODB_ATLAS_PROJECT_ID` are defined, creation of resources is avoided. This is useful for local execution but not intended for CI executions.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.