acc

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: 22 Imported by: 0

Documentation

Index

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 CheckClusterDestroy(s *terraform.State) error

func CheckDatabaseUserAttributes

func CheckDatabaseUserAttributes(dbUser *admin.CloudDatabaseUser, username string) resource.TestCheckFunc

func CheckDatabaseUserExists

func CheckDatabaseUserExists(resourceName string, dbUser *admin.CloudDatabaseUser) resource.TestCheckFunc

func CheckDestroyDatabaseUser

func CheckDestroyDatabaseUser(s *terraform.State) error

func CheckDestroyFederatedDatabaseInstance

func CheckDestroyFederatedDatabaseInstance(s *terraform.State) error

func CheckDestroyLDAPConfiguration

func CheckDestroyLDAPConfiguration(s *terraform.State) error

func CheckDestroyNetworkPeering

func CheckDestroyNetworkPeering(s *terraform.State) error

func CheckDestroyOrgInvitation

func CheckDestroyOrgInvitation(s *terraform.State) error

func CheckDestroyProject

func CheckDestroyProject(s *terraform.State) error

func CheckDestroyProjectIPAccessList

func CheckDestroyProjectIPAccessList(s *terraform.State) error

func CheckDestroySearchIndex

func CheckDestroySearchIndex(state *terraform.State) error

func CheckDestroyStreamInstance

func CheckDestroyStreamInstance(state *terraform.State) error

func CheckDestroyTeam

func CheckDestroyTeam(s *terraform.State) error

func CheckDestroyTeamAdvancedCluster

func CheckDestroyTeamAdvancedCluster(s *terraform.State) error

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 ConfigClusterGlobal(resourceName, orgID, projectName, name, backupEnabled string) string

func ConfigDatabaseUserBasic

func ConfigDatabaseUserBasic(projectName, orgID, roleName, username, keyLabel, valueLabel string) string

func ConfigDatabaseUserWithAWSIAMType

func ConfigDatabaseUserWithAWSIAMType(projectName, orgID, roleName, username, keyLabel, valueLabel string) string

func ConfigDatabaseUserWithLDAPAuthType

func ConfigDatabaseUserWithLDAPAuthType(projectName, orgID, roleName, username, keyLabel, valueLabel string) string

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 ConfigDatabaseUserWithScopes

func ConfigDatabaseUserWithScopes(username, password, roleName, projectName, orgID string, scopesArr []*admin.UserScope) string

func ConfigDatabaseUserWithX509Type

func ConfigDatabaseUserWithX509Type(projectName, orgID, roleName, username, keyLabel, valueLabel, x509Type string) string

func ConfigProject

func ConfigProject(projectName, orgID string, teams []*admin.TeamRole) string

func ConfigProjectGovWithOwner

func ConfigProjectGovWithOwner(projectName, orgID, projectOwnerID string) string

func ConfigProjectIPAccessListWithAWSSecurityGroup

func ConfigProjectIPAccessListWithAWSSecurityGroup(orgID, projectName, providerName, vpcID, awsAccountID, vpcCIDRBlock, awsRegion, awsSGroup, comment string) string

func ConfigProjectIPAccessListWithCIDRBlock

func ConfigProjectIPAccessListWithCIDRBlock(orgID, projectName, cidrBlock, comment string) string

func ConfigProjectIPAccessListWithIPAddress

func ConfigProjectIPAccessListWithIPAddress(orgID, projectName, ipAddress, comment string) string

func ConfigProjectIPAccessListWithMultiple

func ConfigProjectIPAccessListWithMultiple(projectName, orgID string, accessList []map[string]string, isUpdate bool) string

func ConfigProjectWithFalseDefaultSettings

func ConfigProjectWithFalseDefaultSettings(projectName, orgID, projectOwnerID string) string

func ConfigProjectWithLimits

func ConfigProjectWithLimits(projectName, orgID string, limits []*admin.DataFederationLimit) string

func ConfigProjectWithOwner

func ConfigProjectWithOwner(projectName, orgID, projectOwnerID string) string

func ConfigProjectWithSettings added in v1.15.0

func ConfigProjectWithSettings(projectName, orgID, projectOwnerID string, value bool) string

func ConfigProjectWithUpdatedRole

func ConfigProjectWithUpdatedRole(projectName, orgID, teamID, roleName string) string

func ConfigServerlessInstanceBasic

func ConfigServerlessInstanceBasic(orgID, projectName, name string, ignoreConnectionStrings bool) string

func ConfigServerlessInstanceWithTags

func ConfigServerlessInstanceWithTags(orgID, projectName, name string, tags []matlas.Tag) string

func Conn added in v1.15.0

func Conn() *matlas.Client

func ConnV2 added in v1.15.0

func ConnV2() *admin.APIClient

func DebugPlan

func DebugPlan() plancheck.PlanCheck

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 GetProjectTeamsIdsWithPos

func GetProjectTeamsIdsWithPos(pos int) string

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 PreCheck

func PreCheck(tb testing.TB)

func PreCheckAtlasUsername

func PreCheckAtlasUsername(tb testing.TB)

func PreCheckAwsEnv

func PreCheckAwsEnv(tb testing.TB)

func PreCheckBasic

func PreCheckBasic(tb testing.TB)

func PreCheckBasicOwnerID

func PreCheckBasicOwnerID(tb testing.TB)

func PreCheckBetaFlag

func PreCheckBetaFlag(tb testing.TB)

func PreCheckCert added in v1.15.1

func PreCheckCert(tb testing.TB)

func PreCheckCloudProviderAccessAzure

func PreCheckCloudProviderAccessAzure(tb testing.TB)

func PreCheckDataLakePipelineRun

func PreCheckDataLakePipelineRun(tb testing.TB)

func PreCheckDataLakePipelineRuns

func PreCheckDataLakePipelineRuns(tb testing.TB)

func PreCheckEncryptionAtRestEnvAzure

func PreCheckEncryptionAtRestEnvAzure(tb testing.TB)

func PreCheckFederatedSettings

func PreCheckFederatedSettings(tb testing.TB)

func PreCheckGPCEnv

func PreCheckGPCEnv(tb testing.TB)

func PreCheckGov

func PreCheckGov(tb testing.TB)

func PreCheckLDAP

func PreCheckLDAP(tb testing.TB)

func PreCheckPeeringEnvAWS

func PreCheckPeeringEnvAWS(tb testing.TB)

func PreCheckPeeringEnvAzure

func PreCheckPeeringEnvAzure(tb testing.TB)

func PreCheckPeeringEnvGCP

func PreCheckPeeringEnvGCP(tb testing.TB)

func PreCheckPrivateEndpointServiceDataFederationOnlineArchiveRun

func PreCheckPrivateEndpointServiceDataFederationOnlineArchiveRun(tb testing.TB)

func PreCheckProjectTeamsIdsWithMinCount

func PreCheckProjectTeamsIdsWithMinCount(tb testing.TB, minTeamsCount int)

func PreCheckRegularCredsAreEmpty

func PreCheckRegularCredsAreEmpty(tb testing.TB)

func PreCheckS3Bucket added in v1.15.0

func PreCheckS3Bucket(tb testing.TB)

func PreCheckSTSAssumeRole

func PreCheckSTSAssumeRole(tb testing.TB)

func SkipTestForCI

func SkipTestForCI(tb testing.TB)

SkipTestForCI is added to tests that cannot run as part of CI, e.g. in Github actions.

func StreamInstanceConfig

func StreamInstanceConfig(orgID, projectName, instanceName, region, cloudProvider string) string

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.

Jump to

Keyboard shortcuts

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