Skip to content

Commit

Permalink
use global project
Browse files Browse the repository at this point in the history
  • Loading branch information
lantoli committed Mar 9, 2024
1 parent 9a11fba commit e78b287
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
mongodb_atlas_ldap_password: ${{ secrets.MONGODB_ATLAS_LDAP_PASSWORD }}
mongodb_atlas_ldap_port: ${{ secrets.MONGODB_ATLAS_LDAP_PORT }}
mongodb_atlas_ldap_ca_certificate: ${{ secrets.MONGODB_ATLAS_LDAP_CA_CERTIFICATE }}
mongodb_atlas_private_endpoint_id: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_ID_CLOUD_QA || secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_ID_CLOUD_DEV }}
mongodb_atlas_private_endpoint_dns_name: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME_CLOUD_QA || secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME_CLOUD_DEV }}
mongodb_atlas_private_endpoint_id: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_ID }}
mongodb_atlas_private_endpoint_dns_name: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME }}

with:
terraform_version: ${{ inputs.terraform_version || vars.TF_VERSION_LATEST }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/migration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ jobs:
terraform_wrapper: false
- name: Migration Tests
env:
MONGODB_ATLAS_PRIVATE_ENDPOINT_ID: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_ID_CLOUD_DEV }}
MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME_CLOUD_DEV }}
MONGODB_ATLAS_PRIVATE_ENDPOINT_ID: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_ID }}
MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (

func TestAccNetworkPrivatelinkEndpointServiceDataFederationOnlineArchiveDS_basic(t *testing.T) {
var (
projectID = acc.ProjectIDPrivateEndpoint(t)
projectID = acc.ProjectIDGlobal(t)
endpointID = os.Getenv("MONGODB_ATLAS_PRIVATE_ENDPOINT_ID")
customerEndpointDNSName = os.Getenv("MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (

func TestAccNetworkPrivatelinkEndpointServiceDataFederationOnlineArchivesDSPlural_basic(t *testing.T) {
var (
projectID = acc.ProjectIDPrivateEndpoint(t)
projectID = acc.ProjectIDGlobal(t)
endpointID = os.Getenv("MONGODB_ATLAS_PRIVATE_ENDPOINT_ID")
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func TestAccMigrationNetworkPrivatelinkEndpointServiceDataFederationOnlineArchive_basic(t *testing.T) {
var (
projectID = acc.ProjectIDPrivateEndpoint(t)
projectID = acc.ProjectIDGlobal(t)
endpointID = os.Getenv("MONGODB_ATLAS_PRIVATE_ENDPOINT_ID")
config = resourceConfigBasic(projectID, endpointID, comment)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (

func TestAccNetworkPrivatelinkEndpointServiceDataFederationOnlineArchive_basic(t *testing.T) {
var (
projectID = acc.ProjectIDPrivateEndpoint(t)
projectID = acc.ProjectIDGlobal(t)
endpointID = os.Getenv("MONGODB_ATLAS_PRIVATE_ENDPOINT_ID")
)

Expand Down Expand Up @@ -51,7 +51,7 @@ func TestAccNetworkPrivatelinkEndpointServiceDataFederationOnlineArchive_basic(t
}
func TestAccNetworkPrivatelinkEndpointServiceDataFederationOnlineArchive_updateComment(t *testing.T) {
var (
projectID = acc.ProjectIDPrivateEndpoint(t)
projectID = acc.ProjectIDGlobal(t)
endpointID = os.Getenv("MONGODB_ATLAS_PRIVATE_ENDPOINT_ID")
commentUpdated = "Terraform Acceptance Test Updated"
)
Expand Down Expand Up @@ -98,7 +98,7 @@ func TestAccNetworkPrivatelinkEndpointServiceDataFederationOnlineArchive_updateC

func TestAccNetworkPrivatelinkEndpointServiceDataFederationOnlineArchive_basicWithRegionDnsName(t *testing.T) {
var (
projectID = acc.ProjectIDPrivateEndpoint(t)
projectID = acc.ProjectIDGlobal(t)
endpointID = os.Getenv("MONGODB_ATLAS_PRIVATE_ENDPOINT_ID")
customerEndpointDNSName = os.Getenv("MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME")
)
Expand Down
6 changes: 3 additions & 3 deletions internal/testutil/acc/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
const (
prefixName = "test-acc-tf"
prefixProject = prefixName + "-p"
prefixProjectKeep = prefixProject + "-keep-"
prefixProjectKeep = prefixProject + "-keep"
prefixCluster = prefixName + "-c"
prefixIAMRole = "mongodb-atlas-" + prefixName
)
Expand Down Expand Up @@ -41,9 +41,9 @@ func RandomEmail() string {
return fmt.Sprintf("%s-%[email protected]", prefixName, acctest.RandString(10))
}

func ProjectIDPrivateEndpoint(tb testing.TB) string {
func ProjectIDGlobal(tb testing.TB) string {
tb.Helper()
return projectID(tb, prefixProjectKeep+"private-endpoint")
return projectID(tb, prefixProjectKeep+"-global")
}

func projectID(tb testing.TB, name string) string {
Expand Down

0 comments on commit e78b287

Please sign in to comment.