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, projectName, orgID, roleName, clusterName 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 ConfigProjectWithFalseDefaultAdvSettings(projectName, orgID, projectOwnerID string) 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 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 DebugPlan() plancheck.PlanCheck
- 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[T any](value T) 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 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 PreCheckSTSAssumeRole(tb testing.TB)
- func SkipIfTFAccNotDefined(tb testing.TB)
- func SkipTest(tb testing.TB)
- func SkipTestExtCred(tb testing.TB)
- func SkipTestForCI(tb testing.TB)
- func StreamInstanceConfig(orgID, projectName, instanceName, region, cloudProvider string) string
- type ClusterInfo
Constants ¶
const (
// Provider name for single configuration testing
ProviderNameMongoDBAtlas = "mongodbatlas"
)
Variables ¶
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", } )
var TestAccProviderSdkV2 *schema.Provider
TestAccProviderSdkV2 is only being used in tests obtaining client: .Meta().(*MongoDBClient) this provider instance has to be passed into mux server factory for its configure method to be invoked
var TestAccProviderV6Factories map[string]func() (tfprotov6.ProviderServer, error)
var TestMongoDBClient any
TestMongoDBClient is used to configure client required for Framework-based acceptance tests
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 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[T any](value T) resource.CheckResourceAttrWithFunc
func MatchesExpression ¶
func MatchesExpression(expr string) resource.CheckResourceAttrWithFunc
func PreCheckAtlasUsername ¶
func PreCheckAwsEnv ¶
func PreCheckBasic ¶
func PreCheckBasicOwnerID ¶
func PreCheckBetaFlag ¶
func PreCheckGPCEnv ¶
func PreCheckGov ¶
func PreCheckLDAP ¶
func PreCheckPeeringEnvAWS ¶
func PreCheckPeeringEnvAzure ¶
func PreCheckPeeringEnvGCP ¶
func PreCheckSTSAssumeRole ¶
func SkipIfTFAccNotDefined ¶
SkipIfTFAccNotDefined is added to acceptance tests were you do not want any preparation code executed if the resulting steps will not run. Keep in mind that if TF_ACC is empty, go still runs acceptance tests but terraform-plugin-testing does not execute the resulting steps.
func SkipTestExtCred ¶
func SkipTestForCI ¶
SkipTestForCI is added to tests that cannot run as part of a CI
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.