@pulumi/mongodbatlas 3.15.0-alpha.1713333524 → 3.15.0-alpha.1713899327
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accessListApiKey.d.ts +4 -8
- package/accessListApiKey.js +4 -8
- package/accessListApiKey.js.map +1 -1
- package/advancedCluster.d.ts +28 -61
- package/advancedCluster.js +28 -61
- package/advancedCluster.js.map +1 -1
- package/alertConfiguration.d.ts +44 -50
- package/alertConfiguration.js +44 -50
- package/alertConfiguration.js.map +1 -1
- package/apiKey.d.ts +0 -2
- package/apiKey.js +0 -2
- package/apiKey.js.map +1 -1
- package/auditing.d.ts +2 -4
- package/auditing.js +2 -4
- package/auditing.js.map +1 -1
- package/backupCompliancePolicy.d.ts +83 -0
- package/backupCompliancePolicy.js +83 -0
- package/backupCompliancePolicy.js.map +1 -1
- package/cloudBackupSnapshot.d.ts +7 -9
- package/cloudBackupSnapshot.js +7 -9
- package/cloudBackupSnapshot.js.map +1 -1
- package/cloudBackupSnapshotExportBucket.d.ts +2 -4
- package/cloudBackupSnapshotExportBucket.js +2 -4
- package/cloudBackupSnapshotExportBucket.js.map +1 -1
- package/cloudBackupSnapshotExportJob.d.ts +3 -7
- package/cloudBackupSnapshotExportJob.js +3 -7
- package/cloudBackupSnapshotExportJob.js.map +1 -1
- package/cloudBackupSnapshotRestoreJob.d.ts +74 -13
- package/cloudBackupSnapshotRestoreJob.js +74 -13
- package/cloudBackupSnapshotRestoreJob.js.map +1 -1
- package/cluster.d.ts +48 -82
- package/cluster.js +48 -82
- package/cluster.js.map +1 -1
- package/clusterOutageSimulation.d.ts +2 -4
- package/clusterOutageSimulation.js +2 -4
- package/clusterOutageSimulation.js.map +1 -1
- package/customDbRole.d.ts +6 -10
- package/customDbRole.js +6 -10
- package/customDbRole.js.map +1 -1
- package/customDnsConfigurationClusterAws.d.ts +1 -3
- package/customDnsConfigurationClusterAws.js +1 -3
- package/customDnsConfigurationClusterAws.js.map +1 -1
- package/databaseUser.d.ts +19 -27
- package/databaseUser.js +19 -27
- package/databaseUser.js.map +1 -1
- package/eventTrigger.d.ts +24 -28
- package/eventTrigger.js +24 -28
- package/eventTrigger.js.map +1 -1
- package/federatedDatabaseInstance.d.ts +10 -12
- package/federatedDatabaseInstance.js +10 -12
- package/federatedDatabaseInstance.js.map +1 -1
- package/federatedQueryLimit.d.ts +2 -4
- package/federatedQueryLimit.js +2 -4
- package/federatedQueryLimit.js.map +1 -1
- package/federatedSettingsIdentityProvider.d.ts +6 -7
- package/federatedSettingsIdentityProvider.js +6 -7
- package/federatedSettingsIdentityProvider.js.map +1 -1
- package/federatedSettingsOrgRoleMapping.d.ts +2 -4
- package/federatedSettingsOrgRoleMapping.js +2 -4
- package/federatedSettingsOrgRoleMapping.js.map +1 -1
- package/get509AuthenticationDatabaseUser.d.ts +60 -0
- package/get509AuthenticationDatabaseUser.js +60 -0
- package/get509AuthenticationDatabaseUser.js.map +1 -1
- package/getAccessListApiKeys.d.ts +0 -16
- package/getAccessListApiKeys.js.map +1 -1
- package/getAdvancedCluster.d.ts +56 -0
- package/getAdvancedCluster.js +56 -0
- package/getAdvancedCluster.js.map +1 -1
- package/getAlertConfiguration.d.ts +190 -0
- package/getAlertConfiguration.js +190 -0
- package/getAlertConfiguration.js.map +1 -1
- package/getAtlasUser.d.ts +0 -8
- package/getAtlasUser.js +0 -8
- package/getAtlasUser.js.map +1 -1
- package/getAtlasUsers.d.ts +2 -14
- package/getAtlasUsers.js +2 -14
- package/getAtlasUsers.js.map +1 -1
- package/getAuditing.d.ts +34 -0
- package/getAuditing.js +34 -0
- package/getAuditing.js.map +1 -1
- package/getBackupCompliancePolicy.d.ts +166 -0
- package/getBackupCompliancePolicy.js +166 -0
- package/getBackupCompliancePolicy.js.map +1 -1
- package/getCloudBackupSchedule.d.ts +54 -0
- package/getCloudBackupSchedule.js +54 -0
- package/getCloudBackupSchedule.js.map +1 -1
- package/getCloudBackupSnapshot.d.ts +38 -0
- package/getCloudBackupSnapshot.js +38 -0
- package/getCloudBackupSnapshot.js.map +1 -1
- package/getCloudBackupSnapshotExportBucket.d.ts +36 -0
- package/getCloudBackupSnapshotExportBucket.js +36 -0
- package/getCloudBackupSnapshotExportBucket.js.map +1 -1
- package/getCloudBackupSnapshotExportBuckets.d.ts +8 -12
- package/getCloudBackupSnapshotExportBuckets.js +8 -12
- package/getCloudBackupSnapshotExportBuckets.js.map +1 -1
- package/getCloudBackupSnapshotExportJob.d.ts +58 -0
- package/getCloudBackupSnapshotExportJob.js +58 -0
- package/getCloudBackupSnapshotExportJob.js.map +1 -1
- package/getCloudBackupSnapshotExportJobs.d.ts +6 -10
- package/getCloudBackupSnapshotExportJobs.js +6 -10
- package/getCloudBackupSnapshotExportJobs.js.map +1 -1
- package/getCloudBackupSnapshotRestoreJobs.d.ts +6 -10
- package/getCloudBackupSnapshotRestoreJobs.js +6 -10
- package/getCloudBackupSnapshotRestoreJobs.js.map +1 -1
- package/getCloudProviderAccessSetup.d.ts +4 -12
- package/getCloudProviderAccessSetup.js +4 -12
- package/getCloudProviderAccessSetup.js.map +1 -1
- package/getCluster.d.ts +60 -0
- package/getCluster.js +60 -0
- package/getCluster.js.map +1 -1
- package/getClusterOutageSimulation.d.ts +2 -6
- package/getClusterOutageSimulation.js +2 -6
- package/getClusterOutageSimulation.js.map +1 -1
- package/getClusters.d.ts +6 -8
- package/getClusters.js +6 -8
- package/getClusters.js.map +1 -1
- package/getCustomDbRole.d.ts +2 -6
- package/getCustomDbRole.js +2 -6
- package/getCustomDbRole.js.map +1 -1
- package/getCustomDnsConfigurationClusterAws.d.ts +30 -0
- package/getCustomDnsConfigurationClusterAws.js +30 -0
- package/getCustomDnsConfigurationClusterAws.js.map +1 -1
- package/getDatabaseUser.d.ts +124 -0
- package/getDatabaseUser.js +124 -0
- package/getDatabaseUser.js.map +1 -1
- package/getDatabaseUsers.d.ts +14 -22
- package/getDatabaseUsers.js +14 -22
- package/getDatabaseUsers.js.map +1 -1
- package/getFederatedDatabaseInstance.d.ts +6 -14
- package/getFederatedDatabaseInstance.js +6 -14
- package/getFederatedDatabaseInstance.js.map +1 -1
- package/getFederatedQueryLimit.d.ts +2 -6
- package/getFederatedQueryLimit.js +2 -6
- package/getFederatedQueryLimit.js.map +1 -1
- package/getFederatedQueryLimits.d.ts +0 -4
- package/getFederatedQueryLimits.js +0 -4
- package/getFederatedQueryLimits.js.map +1 -1
- package/getFederatedSettings.d.ts +0 -4
- package/getFederatedSettings.js +0 -4
- package/getFederatedSettings.js.map +1 -1
- package/getFederatedSettingsIdentityProvider.d.ts +4 -6
- package/getFederatedSettingsIdentityProvider.js +4 -6
- package/getFederatedSettingsIdentityProvider.js.map +1 -1
- package/getFederatedSettingsIdentityProviders.d.ts +4 -6
- package/getFederatedSettingsIdentityProviders.js +4 -6
- package/getFederatedSettingsIdentityProviders.js.map +1 -1
- package/getFederatedSettingsOrgConfig.d.ts +6 -10
- package/getFederatedSettingsOrgConfig.js +6 -10
- package/getFederatedSettingsOrgConfig.js.map +1 -1
- package/getFederatedSettingsOrgConfigs.d.ts +6 -10
- package/getFederatedSettingsOrgConfigs.js +6 -10
- package/getFederatedSettingsOrgConfigs.js.map +1 -1
- package/getFederatedSettingsOrgRoleMapping.d.ts +4 -8
- package/getFederatedSettingsOrgRoleMapping.js +4 -8
- package/getFederatedSettingsOrgRoleMapping.js.map +1 -1
- package/getGlobalClusterConfig.d.ts +110 -0
- package/getGlobalClusterConfig.js +110 -0
- package/getGlobalClusterConfig.js.map +1 -1
- package/getLdapConfiguration.d.ts +46 -0
- package/getLdapConfiguration.js +46 -0
- package/getLdapConfiguration.js.map +1 -1
- package/getLdapVerify.d.ts +66 -0
- package/getLdapVerify.js +66 -0
- package/getLdapVerify.js.map +1 -1
- package/getMaintenanceWindow.d.ts +60 -0
- package/getMaintenanceWindow.js +60 -0
- package/getMaintenanceWindow.js.map +1 -1
- package/getNetworkContainer.d.ts +36 -0
- package/getNetworkContainer.js +36 -0
- package/getNetworkContainer.js.map +1 -1
- package/getNetworkContainers.d.ts +4 -8
- package/getNetworkContainers.js +4 -8
- package/getNetworkContainers.js.map +1 -1
- package/getNetworkPeering.d.ts +42 -0
- package/getNetworkPeering.js +42 -0
- package/getNetworkPeering.js.map +1 -1
- package/getNetworkPeerings.d.ts +4 -8
- package/getNetworkPeerings.js +4 -8
- package/getNetworkPeerings.js.map +1 -1
- package/getOrganization.d.ts +0 -4
- package/getOrganization.js +0 -4
- package/getOrganization.js.map +1 -1
- package/getOrganizations.d.ts +2 -12
- package/getOrganizations.js +2 -6
- package/getOrganizations.js.map +1 -1
- package/getPrivateLinkEndpoint.d.ts +42 -0
- package/getPrivateLinkEndpoint.js +42 -0
- package/getPrivateLinkEndpoint.js.map +1 -1
- package/getPrivatelinkEndpointServiceDataFederationOnlineArchive.d.ts +8 -6
- package/getPrivatelinkEndpointServiceDataFederationOnlineArchive.js +8 -6
- package/getPrivatelinkEndpointServiceDataFederationOnlineArchive.js.map +1 -1
- package/getPrivatelinkEndpointServiceDataFederationOnlineArchives.d.ts +8 -6
- package/getPrivatelinkEndpointServiceDataFederationOnlineArchives.js +8 -6
- package/getPrivatelinkEndpointServiceDataFederationOnlineArchives.js.map +1 -1
- package/getPrivatelinkEndpointServiceServerless.d.ts +20 -24
- package/getPrivatelinkEndpointServiceServerless.js +20 -24
- package/getPrivatelinkEndpointServiceServerless.js.map +1 -1
- package/getPrivatelinkEndpointsServiceServerless.d.ts +20 -24
- package/getPrivatelinkEndpointsServiceServerless.js +20 -24
- package/getPrivatelinkEndpointsServiceServerless.js.map +1 -1
- package/getProject.d.ts +126 -0
- package/getProject.js +126 -0
- package/getProject.js.map +1 -1
- package/getProjectApiKey.d.ts +36 -0
- package/getProjectApiKey.js +36 -0
- package/getProjectApiKey.js.map +1 -1
- package/getProjectApiKeys.d.ts +2 -6
- package/getProjectApiKeys.js +2 -6
- package/getProjectApiKeys.js.map +1 -1
- package/getProjectInvitation.d.ts +34 -0
- package/getProjectInvitation.js +34 -0
- package/getProjectInvitation.js.map +1 -1
- package/getProjectIpAccessList.d.ts +134 -0
- package/getProjectIpAccessList.js +134 -0
- package/getProjectIpAccessList.js.map +1 -1
- package/getProjects.d.ts +10 -12
- package/getProjects.js +10 -12
- package/getProjects.js.map +1 -1
- package/getRolesOrgId.d.ts +0 -4
- package/getRolesOrgId.js +0 -4
- package/getRolesOrgId.js.map +1 -1
- package/getSearchIndex.d.ts +2 -6
- package/getSearchIndex.js +2 -6
- package/getSearchIndex.js.map +1 -1
- package/getServerlessInstance.d.ts +0 -4
- package/getServerlessInstance.js +0 -4
- package/getServerlessInstance.js.map +1 -1
- package/getServerlessInstances.d.ts +0 -4
- package/getServerlessInstances.js +0 -4
- package/getServerlessInstances.js.map +1 -1
- package/getThirdPartyIntegration.d.ts +2 -6
- package/getThirdPartyIntegration.js +2 -6
- package/getThirdPartyIntegration.js.map +1 -1
- package/getThirdPartyIntegrations.d.ts +4 -8
- package/getThirdPartyIntegrations.js +4 -8
- package/getThirdPartyIntegrations.js.map +1 -1
- package/getX509AuthenticationDatabaseUser.d.ts +60 -0
- package/getX509AuthenticationDatabaseUser.js +60 -0
- package/getX509AuthenticationDatabaseUser.js.map +1 -1
- package/globalClusterConfig.d.ts +4 -6
- package/globalClusterConfig.js +4 -6
- package/globalClusterConfig.js.map +1 -1
- package/ldapConfiguration.d.ts +12 -10
- package/ldapConfiguration.js +12 -10
- package/ldapConfiguration.js.map +1 -1
- package/ldapVerify.d.ts +9 -8
- package/ldapVerify.js +9 -8
- package/ldapVerify.js.map +1 -1
- package/maintenanceWindow.d.ts +2 -6
- package/maintenanceWindow.js +2 -6
- package/maintenanceWindow.js.map +1 -1
- package/networkContainer.d.ts +3 -9
- package/networkContainer.js +3 -9
- package/networkContainer.js.map +1 -1
- package/networkPeering.d.ts +38 -151
- package/networkPeering.js +38 -151
- package/networkPeering.js.map +1 -1
- package/onlineArchive.d.ts +8 -12
- package/onlineArchive.js +8 -12
- package/onlineArchive.js.map +1 -1
- package/orgInvitation.d.ts +4 -10
- package/orgInvitation.js +4 -10
- package/orgInvitation.js.map +1 -1
- package/organization.d.ts +2 -3
- package/organization.js +2 -3
- package/organization.js.map +1 -1
- package/package.json +1 -1
- package/privateLinkEndpoint.d.ts +0 -2
- package/privateLinkEndpoint.js +0 -2
- package/privateLinkEndpoint.js.map +1 -1
- package/privateLinkEndpointService.d.ts +93 -26
- package/privateLinkEndpointService.js +93 -26
- package/privateLinkEndpointService.js.map +1 -1
- package/privatelinkEndpointServerless.d.ts +3 -4
- package/privatelinkEndpointServerless.js +3 -4
- package/privatelinkEndpointServerless.js.map +1 -1
- package/privatelinkEndpointServiceDataFederationOnlineArchive.d.ts +4 -3
- package/privatelinkEndpointServiceDataFederationOnlineArchive.js +4 -3
- package/privatelinkEndpointServiceDataFederationOnlineArchive.js.map +1 -1
- package/privatelinkEndpointServiceServerless.d.ts +52 -8
- package/privatelinkEndpointServiceServerless.js +52 -8
- package/privatelinkEndpointServiceServerless.js.map +1 -1
- package/project.d.ts +4 -5
- package/project.js +4 -5
- package/project.js.map +1 -1
- package/projectApiKey.d.ts +0 -4
- package/projectApiKey.js +0 -4
- package/projectApiKey.js.map +1 -1
- package/projectInvitation.d.ts +2 -6
- package/projectInvitation.js +2 -6
- package/projectInvitation.js.map +1 -1
- package/projectIpAccessList.d.ts +8 -14
- package/projectIpAccessList.js +8 -14
- package/projectIpAccessList.js.map +1 -1
- package/searchIndex.d.ts +7 -11
- package/searchIndex.js +7 -11
- package/searchIndex.js.map +1 -1
- package/serverlessInstance.d.ts +1 -2
- package/serverlessInstance.js +1 -2
- package/serverlessInstance.js.map +1 -1
- package/thirdPartyIntegration.d.ts +3 -113
- package/thirdPartyIntegration.js +3 -5
- package/thirdPartyIntegration.js.map +1 -1
- package/types/input.d.ts +1 -332
- package/types/output.d.ts +13 -408
package/networkPeering.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
23
23
|
*
|
|
24
24
|
* ### Example with AWS
|
|
25
25
|
*
|
|
26
|
-
* <!--Start PulumiCodeChooser -->
|
|
27
26
|
* ```typescript
|
|
28
27
|
* import * as pulumi from "@pulumi/pulumi";
|
|
29
28
|
* import * as aws from "@pulumi/aws";
|
|
@@ -31,16 +30,16 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
31
30
|
*
|
|
32
31
|
* // Container example provided but not always required,
|
|
33
32
|
* // see network_container documentation for details.
|
|
34
|
-
* const
|
|
35
|
-
* projectId:
|
|
33
|
+
* const test = new mongodbatlas.NetworkContainer("test", {
|
|
34
|
+
* projectId: projectId,
|
|
36
35
|
* atlasCidrBlock: "10.8.0.0/21",
|
|
37
36
|
* providerName: "AWS",
|
|
38
37
|
* regionName: "US_EAST_1",
|
|
39
38
|
* });
|
|
40
39
|
* // Create the peering connection request
|
|
41
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("
|
|
40
|
+
* const testNetworkPeering = new mongodbatlas.NetworkPeering("test", {
|
|
42
41
|
* accepterRegionName: "us-east-1",
|
|
43
|
-
* projectId:
|
|
42
|
+
* projectId: projectId,
|
|
44
43
|
* containerId: "507f1f77bcf86cd799439011",
|
|
45
44
|
* providerName: "AWS",
|
|
46
45
|
* routeTableCidrBlock: "192.168.0.0/24",
|
|
@@ -49,78 +48,14 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
49
48
|
* });
|
|
50
49
|
* // the following assumes an AWS provider is configured
|
|
51
50
|
* // Accept the peering connection request
|
|
52
|
-
* const peer = new aws.
|
|
51
|
+
* const peer = new aws.index.VpcPeeringConnectionAccepter("peer", {
|
|
53
52
|
* vpcPeeringConnectionId: testNetworkPeering.connectionId,
|
|
54
53
|
* autoAccept: true,
|
|
55
54
|
* });
|
|
56
55
|
* ```
|
|
57
|
-
* <!--End PulumiCodeChooser -->
|
|
58
|
-
*
|
|
59
|
-
* ### Example with GCP
|
|
60
|
-
*
|
|
61
|
-
* <!--Start PulumiCodeChooser -->
|
|
62
|
-
* ```typescript
|
|
63
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
64
|
-
* import * as gcp from "@pulumi/gcp";
|
|
65
|
-
* import * as mongodbatlas from "@pulumi/mongodbatlas";
|
|
66
|
-
*
|
|
67
|
-
* // Container example provided but not always required,
|
|
68
|
-
* // see network_container documentation for details.
|
|
69
|
-
* const testNetworkContainer = new mongodbatlas.NetworkContainer("testNetworkContainer", {
|
|
70
|
-
* projectId: local.project_id,
|
|
71
|
-
* atlasCidrBlock: "10.8.0.0/21",
|
|
72
|
-
* providerName: "GCP",
|
|
73
|
-
* });
|
|
74
|
-
* // Create the peering connection request
|
|
75
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("testNetworkPeering", {
|
|
76
|
-
* projectId: local.project_id,
|
|
77
|
-
* containerId: testNetworkContainer.containerId,
|
|
78
|
-
* providerName: "GCP",
|
|
79
|
-
* gcpProjectId: local.GCP_PROJECT_ID,
|
|
80
|
-
* networkName: "default",
|
|
81
|
-
* });
|
|
82
|
-
* const default = gcp.compute.getNetwork({
|
|
83
|
-
* name: "default",
|
|
84
|
-
* });
|
|
85
|
-
* // Create the GCP peer
|
|
86
|
-
* const peering = new gcp.compute.NetworkPeering("peering", {
|
|
87
|
-
* network: _default.then(_default => _default.selfLink),
|
|
88
|
-
* peerNetwork: pulumi.interpolate`https://www.googleapis.com/compute/v1/projects/${testNetworkPeering.atlasGcpProjectId}/global/networks/${testNetworkPeering.atlasVpcName}`,
|
|
89
|
-
* });
|
|
90
|
-
* // Create the cluster once the peering connection is completed
|
|
91
|
-
* const testCluster = new mongodbatlas.Cluster("testCluster", {
|
|
92
|
-
* projectId: local.project_id,
|
|
93
|
-
* numShards: 1,
|
|
94
|
-
* clusterType: "REPLICASET",
|
|
95
|
-
* replicationSpecs: [{
|
|
96
|
-
* numShards: 1,
|
|
97
|
-
* regionsConfigs: [{
|
|
98
|
-
* regionName: "US_EAST_4",
|
|
99
|
-
* electableNodes: 3,
|
|
100
|
-
* priority: 7,
|
|
101
|
-
* readOnlyNodes: 0,
|
|
102
|
-
* }],
|
|
103
|
-
* }],
|
|
104
|
-
* autoScalingDiskGbEnabled: true,
|
|
105
|
-
* mongoDbMajorVersion: "4.2",
|
|
106
|
-
* providerName: "GCP",
|
|
107
|
-
* providerInstanceSizeName: "M10",
|
|
108
|
-
* }, {
|
|
109
|
-
* dependsOn: ["google_compute_network_peering.peering"],
|
|
110
|
-
* });
|
|
111
|
-
* // Private connection strings are not available w/ GCP until the reciprocal
|
|
112
|
-
* // connection changes to available (i.e. when the status attribute changes
|
|
113
|
-
* // to AVAILABLE on the 'mongodbatlas_network_peering' resource, which
|
|
114
|
-
* // happens when the google_compute_network_peering and and
|
|
115
|
-
* // mongodbatlas_network_peering make a reciprocal connection). Hence
|
|
116
|
-
* // since the cluster can be created before this connection completes
|
|
117
|
-
* // you may need to run `terraform refresh` to obtain the private connection strings.
|
|
118
|
-
* ```
|
|
119
|
-
* <!--End PulumiCodeChooser -->
|
|
120
56
|
*
|
|
121
57
|
* ### Example with Azure
|
|
122
58
|
*
|
|
123
|
-
* <!--Start PulumiCodeChooser -->
|
|
124
59
|
* ```typescript
|
|
125
60
|
* import * as pulumi from "@pulumi/pulumi";
|
|
126
61
|
* import * as mongodbatlas from "@pulumi/mongodbatlas";
|
|
@@ -129,25 +64,26 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
129
64
|
* // see https://docs.atlas.mongodb.com/security-vpc-peering/
|
|
130
65
|
* // Container example provided but not always required,
|
|
131
66
|
* // see network_container documentation for details.
|
|
132
|
-
* const
|
|
133
|
-
* projectId:
|
|
134
|
-
* atlasCidrBlock:
|
|
67
|
+
* const test = new mongodbatlas.NetworkContainer("test", {
|
|
68
|
+
* projectId: projectId,
|
|
69
|
+
* atlasCidrBlock: ATLAS_CIDR_BLOCK,
|
|
135
70
|
* providerName: "AZURE",
|
|
136
71
|
* region: "US_EAST_2",
|
|
137
72
|
* });
|
|
138
73
|
* // Create the peering connection request
|
|
139
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("
|
|
140
|
-
* projectId:
|
|
141
|
-
* containerId:
|
|
74
|
+
* const testNetworkPeering = new mongodbatlas.NetworkPeering("test", {
|
|
75
|
+
* projectId: projectId,
|
|
76
|
+
* containerId: test.containerId,
|
|
142
77
|
* providerName: "AZURE",
|
|
143
|
-
* azureDirectoryId:
|
|
144
|
-
* azureSubscriptionId:
|
|
145
|
-
* resourceGroupName:
|
|
146
|
-
* vnetName:
|
|
78
|
+
* azureDirectoryId: AZURE_DIRECTORY_ID,
|
|
79
|
+
* azureSubscriptionId: AZURE_SUBSCRIPTION_ID,
|
|
80
|
+
* resourceGroupName: AZURE_RESOURCES_GROUP_NAME,
|
|
81
|
+
* vnetName: AZURE_VNET_NAME,
|
|
147
82
|
* });
|
|
148
83
|
* // Create the cluster once the peering connection is completed
|
|
149
|
-
* const testCluster = new mongodbatlas.Cluster("
|
|
150
|
-
* projectId:
|
|
84
|
+
* const testCluster = new mongodbatlas.Cluster("test", {
|
|
85
|
+
* projectId: projectId,
|
|
86
|
+
* name: "terraform-manually-test",
|
|
151
87
|
* clusterType: "REPLICASET",
|
|
152
88
|
* replicationSpecs: [{
|
|
153
89
|
* numShards: 1,
|
|
@@ -164,16 +100,14 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
164
100
|
* providerDiskTypeName: "P4",
|
|
165
101
|
* providerInstanceSizeName: "M10",
|
|
166
102
|
* }, {
|
|
167
|
-
* dependsOn: [
|
|
103
|
+
* dependsOn: [testNetworkPeering],
|
|
168
104
|
* });
|
|
169
105
|
* ```
|
|
170
|
-
* <!--End PulumiCodeChooser -->
|
|
171
106
|
*
|
|
172
107
|
* ### Peering Connection Only, Container Exists
|
|
173
108
|
* You can create a peering connection if an appropriate container for your cloud provider already exists in your project (see the networkContainer resource for more information). A container may already exist if you have already created a cluster in your project, if so you may obtain the `containerId` from the cluster resource as shown in the examples below.
|
|
174
109
|
*
|
|
175
110
|
* ### Example with AWS
|
|
176
|
-
* <!--Start PulumiCodeChooser -->
|
|
177
111
|
* ```typescript
|
|
178
112
|
* import * as pulumi from "@pulumi/pulumi";
|
|
179
113
|
* import * as aws from "@pulumi/aws";
|
|
@@ -182,7 +116,8 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
182
116
|
* // Create an Atlas cluster, this creates a container if one
|
|
183
117
|
* // does not yet exist for this AWS region
|
|
184
118
|
* const test = new mongodbatlas.Cluster("test", {
|
|
185
|
-
* projectId:
|
|
119
|
+
* projectId: projectId,
|
|
120
|
+
* name: "terraform-test",
|
|
186
121
|
* clusterType: "REPLICASET",
|
|
187
122
|
* replicationSpecs: [{
|
|
188
123
|
* numShards: 1,
|
|
@@ -199,79 +134,31 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
199
134
|
* providerInstanceSizeName: "M10",
|
|
200
135
|
* });
|
|
201
136
|
* // the following assumes an AWS provider is configured
|
|
202
|
-
* const _default = new aws.
|
|
203
|
-
*
|
|
137
|
+
* const _default = new aws.index.DefaultVpc("default", {tags: {
|
|
138
|
+
* name: "Default VPC",
|
|
204
139
|
* }});
|
|
205
140
|
* // Create the peering connection request
|
|
206
|
-
* const mongoPeer = new mongodbatlas.NetworkPeering("
|
|
141
|
+
* const mongoPeer = new mongodbatlas.NetworkPeering("mongo_peer", {
|
|
207
142
|
* accepterRegionName: "us-east-2",
|
|
208
|
-
* projectId:
|
|
143
|
+
* projectId: projectId,
|
|
209
144
|
* containerId: test.containerId,
|
|
210
145
|
* providerName: "AWS",
|
|
211
146
|
* routeTableCidrBlock: "172.31.0.0/16",
|
|
212
147
|
* vpcId: _default.id,
|
|
213
|
-
* awsAccountId:
|
|
148
|
+
* awsAccountId: AWS_ACCOUNT_ID,
|
|
214
149
|
* });
|
|
215
150
|
* // Accept the connection
|
|
216
|
-
* const awsPeer = new aws.
|
|
151
|
+
* const awsPeer = new aws.index.VpcPeeringConnectionAccepter("aws_peer", {
|
|
217
152
|
* vpcPeeringConnectionId: mongoPeer.connectionId,
|
|
218
153
|
* autoAccept: true,
|
|
219
154
|
* tags: {
|
|
220
|
-
*
|
|
155
|
+
* side: "Accepter",
|
|
221
156
|
* },
|
|
222
157
|
* });
|
|
223
158
|
* ```
|
|
224
|
-
* <!--End PulumiCodeChooser -->
|
|
225
|
-
*
|
|
226
|
-
* ### Example with GCP
|
|
227
|
-
* <!--Start PulumiCodeChooser -->
|
|
228
|
-
* ```typescript
|
|
229
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
230
|
-
* import * as gcp from "@pulumi/gcp";
|
|
231
|
-
* import * as mongodbatlas from "@pulumi/mongodbatlas";
|
|
232
|
-
*
|
|
233
|
-
* // Create an Atlas cluster, this creates a container if one
|
|
234
|
-
* // does not yet exist for this GCP
|
|
235
|
-
* const testCluster = new mongodbatlas.Cluster("testCluster", {
|
|
236
|
-
* projectId: local.project_id,
|
|
237
|
-
* clusterType: "REPLICASET",
|
|
238
|
-
* replicationSpecs: [{
|
|
239
|
-
* numShards: 1,
|
|
240
|
-
* regionsConfigs: [{
|
|
241
|
-
* regionName: "US_EAST_2",
|
|
242
|
-
* electableNodes: 3,
|
|
243
|
-
* priority: 7,
|
|
244
|
-
* readOnlyNodes: 0,
|
|
245
|
-
* }],
|
|
246
|
-
* }],
|
|
247
|
-
* autoScalingDiskGbEnabled: true,
|
|
248
|
-
* mongoDbMajorVersion: "4.2",
|
|
249
|
-
* providerName: "GCP",
|
|
250
|
-
* providerInstanceSizeName: "M10",
|
|
251
|
-
* });
|
|
252
|
-
* // Create the peering connection request
|
|
253
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("testNetworkPeering", {
|
|
254
|
-
* projectId: local.project_id,
|
|
255
|
-
* atlasCidrBlock: "192.168.0.0/18",
|
|
256
|
-
* containerId: testCluster.containerId,
|
|
257
|
-
* providerName: "GCP",
|
|
258
|
-
* gcpProjectId: local.GCP_PROJECT_ID,
|
|
259
|
-
* networkName: "default",
|
|
260
|
-
* });
|
|
261
|
-
* const default = gcp.compute.getNetwork({
|
|
262
|
-
* name: "default",
|
|
263
|
-
* });
|
|
264
|
-
* // Create the GCP peer
|
|
265
|
-
* const peering = new gcp.compute.NetworkPeering("peering", {
|
|
266
|
-
* network: _default.then(_default => _default.selfLink),
|
|
267
|
-
* peerNetwork: pulumi.interpolate`https://www.googleapis.com/compute/v1/projects/${testNetworkPeering.atlasGcpProjectId}/global/networks/${testNetworkPeering.atlasVpcName}`,
|
|
268
|
-
* });
|
|
269
|
-
* ```
|
|
270
|
-
* <!--End PulumiCodeChooser -->
|
|
271
159
|
*
|
|
272
160
|
* ### Example with Azure
|
|
273
161
|
*
|
|
274
|
-
* <!--Start PulumiCodeChooser -->
|
|
275
162
|
* ```typescript
|
|
276
163
|
* import * as pulumi from "@pulumi/pulumi";
|
|
277
164
|
* import * as mongodbatlas from "@pulumi/mongodbatlas";
|
|
@@ -280,8 +167,9 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
280
167
|
* // see https://docs.atlas.mongodb.com/security-vpc-peering/
|
|
281
168
|
* // Create an Atlas cluster, this creates a container if one
|
|
282
169
|
* // does not yet exist for this AZURE region
|
|
283
|
-
* const
|
|
284
|
-
* projectId:
|
|
170
|
+
* const test = new mongodbatlas.Cluster("test", {
|
|
171
|
+
* projectId: projectId,
|
|
172
|
+
* name: "cluster-azure",
|
|
285
173
|
* clusterType: "REPLICASET",
|
|
286
174
|
* replicationSpecs: [{
|
|
287
175
|
* numShards: 1,
|
|
@@ -298,17 +186,16 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
298
186
|
* providerInstanceSizeName: "M10",
|
|
299
187
|
* });
|
|
300
188
|
* // Create the peering connection request
|
|
301
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("
|
|
302
|
-
* projectId:
|
|
303
|
-
* containerId:
|
|
189
|
+
* const testNetworkPeering = new mongodbatlas.NetworkPeering("test", {
|
|
190
|
+
* projectId: projectId,
|
|
191
|
+
* containerId: test.containerId,
|
|
304
192
|
* providerName: "AZURE",
|
|
305
|
-
* azureDirectoryId:
|
|
306
|
-
* azureSubscriptionId:
|
|
307
|
-
* resourceGroupName:
|
|
308
|
-
* vnetName:
|
|
193
|
+
* azureDirectoryId: AZURE_DIRECTORY_ID,
|
|
194
|
+
* azureSubscriptionId: AZURE_SUBSCRIPTION_ID,
|
|
195
|
+
* resourceGroupName: AZURE_RESOURCE_GROUP_NAME,
|
|
196
|
+
* vnetName: AZURE_VNET_NAME,
|
|
309
197
|
* });
|
|
310
198
|
* ```
|
|
311
|
-
* <!--End PulumiCodeChooser -->
|
|
312
199
|
*
|
|
313
200
|
* ## Import
|
|
314
201
|
*
|
package/networkPeering.js
CHANGED
|
@@ -29,7 +29,6 @@ const utilities = require("./utilities");
|
|
|
29
29
|
*
|
|
30
30
|
* ### Example with AWS
|
|
31
31
|
*
|
|
32
|
-
* <!--Start PulumiCodeChooser -->
|
|
33
32
|
* ```typescript
|
|
34
33
|
* import * as pulumi from "@pulumi/pulumi";
|
|
35
34
|
* import * as aws from "@pulumi/aws";
|
|
@@ -37,16 +36,16 @@ const utilities = require("./utilities");
|
|
|
37
36
|
*
|
|
38
37
|
* // Container example provided but not always required,
|
|
39
38
|
* // see network_container documentation for details.
|
|
40
|
-
* const
|
|
41
|
-
* projectId:
|
|
39
|
+
* const test = new mongodbatlas.NetworkContainer("test", {
|
|
40
|
+
* projectId: projectId,
|
|
42
41
|
* atlasCidrBlock: "10.8.0.0/21",
|
|
43
42
|
* providerName: "AWS",
|
|
44
43
|
* regionName: "US_EAST_1",
|
|
45
44
|
* });
|
|
46
45
|
* // Create the peering connection request
|
|
47
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("
|
|
46
|
+
* const testNetworkPeering = new mongodbatlas.NetworkPeering("test", {
|
|
48
47
|
* accepterRegionName: "us-east-1",
|
|
49
|
-
* projectId:
|
|
48
|
+
* projectId: projectId,
|
|
50
49
|
* containerId: "507f1f77bcf86cd799439011",
|
|
51
50
|
* providerName: "AWS",
|
|
52
51
|
* routeTableCidrBlock: "192.168.0.0/24",
|
|
@@ -55,78 +54,14 @@ const utilities = require("./utilities");
|
|
|
55
54
|
* });
|
|
56
55
|
* // the following assumes an AWS provider is configured
|
|
57
56
|
* // Accept the peering connection request
|
|
58
|
-
* const peer = new aws.
|
|
57
|
+
* const peer = new aws.index.VpcPeeringConnectionAccepter("peer", {
|
|
59
58
|
* vpcPeeringConnectionId: testNetworkPeering.connectionId,
|
|
60
59
|
* autoAccept: true,
|
|
61
60
|
* });
|
|
62
61
|
* ```
|
|
63
|
-
* <!--End PulumiCodeChooser -->
|
|
64
|
-
*
|
|
65
|
-
* ### Example with GCP
|
|
66
|
-
*
|
|
67
|
-
* <!--Start PulumiCodeChooser -->
|
|
68
|
-
* ```typescript
|
|
69
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
70
|
-
* import * as gcp from "@pulumi/gcp";
|
|
71
|
-
* import * as mongodbatlas from "@pulumi/mongodbatlas";
|
|
72
|
-
*
|
|
73
|
-
* // Container example provided but not always required,
|
|
74
|
-
* // see network_container documentation for details.
|
|
75
|
-
* const testNetworkContainer = new mongodbatlas.NetworkContainer("testNetworkContainer", {
|
|
76
|
-
* projectId: local.project_id,
|
|
77
|
-
* atlasCidrBlock: "10.8.0.0/21",
|
|
78
|
-
* providerName: "GCP",
|
|
79
|
-
* });
|
|
80
|
-
* // Create the peering connection request
|
|
81
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("testNetworkPeering", {
|
|
82
|
-
* projectId: local.project_id,
|
|
83
|
-
* containerId: testNetworkContainer.containerId,
|
|
84
|
-
* providerName: "GCP",
|
|
85
|
-
* gcpProjectId: local.GCP_PROJECT_ID,
|
|
86
|
-
* networkName: "default",
|
|
87
|
-
* });
|
|
88
|
-
* const default = gcp.compute.getNetwork({
|
|
89
|
-
* name: "default",
|
|
90
|
-
* });
|
|
91
|
-
* // Create the GCP peer
|
|
92
|
-
* const peering = new gcp.compute.NetworkPeering("peering", {
|
|
93
|
-
* network: _default.then(_default => _default.selfLink),
|
|
94
|
-
* peerNetwork: pulumi.interpolate`https://www.googleapis.com/compute/v1/projects/${testNetworkPeering.atlasGcpProjectId}/global/networks/${testNetworkPeering.atlasVpcName}`,
|
|
95
|
-
* });
|
|
96
|
-
* // Create the cluster once the peering connection is completed
|
|
97
|
-
* const testCluster = new mongodbatlas.Cluster("testCluster", {
|
|
98
|
-
* projectId: local.project_id,
|
|
99
|
-
* numShards: 1,
|
|
100
|
-
* clusterType: "REPLICASET",
|
|
101
|
-
* replicationSpecs: [{
|
|
102
|
-
* numShards: 1,
|
|
103
|
-
* regionsConfigs: [{
|
|
104
|
-
* regionName: "US_EAST_4",
|
|
105
|
-
* electableNodes: 3,
|
|
106
|
-
* priority: 7,
|
|
107
|
-
* readOnlyNodes: 0,
|
|
108
|
-
* }],
|
|
109
|
-
* }],
|
|
110
|
-
* autoScalingDiskGbEnabled: true,
|
|
111
|
-
* mongoDbMajorVersion: "4.2",
|
|
112
|
-
* providerName: "GCP",
|
|
113
|
-
* providerInstanceSizeName: "M10",
|
|
114
|
-
* }, {
|
|
115
|
-
* dependsOn: ["google_compute_network_peering.peering"],
|
|
116
|
-
* });
|
|
117
|
-
* // Private connection strings are not available w/ GCP until the reciprocal
|
|
118
|
-
* // connection changes to available (i.e. when the status attribute changes
|
|
119
|
-
* // to AVAILABLE on the 'mongodbatlas_network_peering' resource, which
|
|
120
|
-
* // happens when the google_compute_network_peering and and
|
|
121
|
-
* // mongodbatlas_network_peering make a reciprocal connection). Hence
|
|
122
|
-
* // since the cluster can be created before this connection completes
|
|
123
|
-
* // you may need to run `terraform refresh` to obtain the private connection strings.
|
|
124
|
-
* ```
|
|
125
|
-
* <!--End PulumiCodeChooser -->
|
|
126
62
|
*
|
|
127
63
|
* ### Example with Azure
|
|
128
64
|
*
|
|
129
|
-
* <!--Start PulumiCodeChooser -->
|
|
130
65
|
* ```typescript
|
|
131
66
|
* import * as pulumi from "@pulumi/pulumi";
|
|
132
67
|
* import * as mongodbatlas from "@pulumi/mongodbatlas";
|
|
@@ -135,25 +70,26 @@ const utilities = require("./utilities");
|
|
|
135
70
|
* // see https://docs.atlas.mongodb.com/security-vpc-peering/
|
|
136
71
|
* // Container example provided but not always required,
|
|
137
72
|
* // see network_container documentation for details.
|
|
138
|
-
* const
|
|
139
|
-
* projectId:
|
|
140
|
-
* atlasCidrBlock:
|
|
73
|
+
* const test = new mongodbatlas.NetworkContainer("test", {
|
|
74
|
+
* projectId: projectId,
|
|
75
|
+
* atlasCidrBlock: ATLAS_CIDR_BLOCK,
|
|
141
76
|
* providerName: "AZURE",
|
|
142
77
|
* region: "US_EAST_2",
|
|
143
78
|
* });
|
|
144
79
|
* // Create the peering connection request
|
|
145
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("
|
|
146
|
-
* projectId:
|
|
147
|
-
* containerId:
|
|
80
|
+
* const testNetworkPeering = new mongodbatlas.NetworkPeering("test", {
|
|
81
|
+
* projectId: projectId,
|
|
82
|
+
* containerId: test.containerId,
|
|
148
83
|
* providerName: "AZURE",
|
|
149
|
-
* azureDirectoryId:
|
|
150
|
-
* azureSubscriptionId:
|
|
151
|
-
* resourceGroupName:
|
|
152
|
-
* vnetName:
|
|
84
|
+
* azureDirectoryId: AZURE_DIRECTORY_ID,
|
|
85
|
+
* azureSubscriptionId: AZURE_SUBSCRIPTION_ID,
|
|
86
|
+
* resourceGroupName: AZURE_RESOURCES_GROUP_NAME,
|
|
87
|
+
* vnetName: AZURE_VNET_NAME,
|
|
153
88
|
* });
|
|
154
89
|
* // Create the cluster once the peering connection is completed
|
|
155
|
-
* const testCluster = new mongodbatlas.Cluster("
|
|
156
|
-
* projectId:
|
|
90
|
+
* const testCluster = new mongodbatlas.Cluster("test", {
|
|
91
|
+
* projectId: projectId,
|
|
92
|
+
* name: "terraform-manually-test",
|
|
157
93
|
* clusterType: "REPLICASET",
|
|
158
94
|
* replicationSpecs: [{
|
|
159
95
|
* numShards: 1,
|
|
@@ -170,16 +106,14 @@ const utilities = require("./utilities");
|
|
|
170
106
|
* providerDiskTypeName: "P4",
|
|
171
107
|
* providerInstanceSizeName: "M10",
|
|
172
108
|
* }, {
|
|
173
|
-
* dependsOn: [
|
|
109
|
+
* dependsOn: [testNetworkPeering],
|
|
174
110
|
* });
|
|
175
111
|
* ```
|
|
176
|
-
* <!--End PulumiCodeChooser -->
|
|
177
112
|
*
|
|
178
113
|
* ### Peering Connection Only, Container Exists
|
|
179
114
|
* You can create a peering connection if an appropriate container for your cloud provider already exists in your project (see the networkContainer resource for more information). A container may already exist if you have already created a cluster in your project, if so you may obtain the `containerId` from the cluster resource as shown in the examples below.
|
|
180
115
|
*
|
|
181
116
|
* ### Example with AWS
|
|
182
|
-
* <!--Start PulumiCodeChooser -->
|
|
183
117
|
* ```typescript
|
|
184
118
|
* import * as pulumi from "@pulumi/pulumi";
|
|
185
119
|
* import * as aws from "@pulumi/aws";
|
|
@@ -188,7 +122,8 @@ const utilities = require("./utilities");
|
|
|
188
122
|
* // Create an Atlas cluster, this creates a container if one
|
|
189
123
|
* // does not yet exist for this AWS region
|
|
190
124
|
* const test = new mongodbatlas.Cluster("test", {
|
|
191
|
-
* projectId:
|
|
125
|
+
* projectId: projectId,
|
|
126
|
+
* name: "terraform-test",
|
|
192
127
|
* clusterType: "REPLICASET",
|
|
193
128
|
* replicationSpecs: [{
|
|
194
129
|
* numShards: 1,
|
|
@@ -205,79 +140,31 @@ const utilities = require("./utilities");
|
|
|
205
140
|
* providerInstanceSizeName: "M10",
|
|
206
141
|
* });
|
|
207
142
|
* // the following assumes an AWS provider is configured
|
|
208
|
-
* const _default = new aws.
|
|
209
|
-
*
|
|
143
|
+
* const _default = new aws.index.DefaultVpc("default", {tags: {
|
|
144
|
+
* name: "Default VPC",
|
|
210
145
|
* }});
|
|
211
146
|
* // Create the peering connection request
|
|
212
|
-
* const mongoPeer = new mongodbatlas.NetworkPeering("
|
|
147
|
+
* const mongoPeer = new mongodbatlas.NetworkPeering("mongo_peer", {
|
|
213
148
|
* accepterRegionName: "us-east-2",
|
|
214
|
-
* projectId:
|
|
149
|
+
* projectId: projectId,
|
|
215
150
|
* containerId: test.containerId,
|
|
216
151
|
* providerName: "AWS",
|
|
217
152
|
* routeTableCidrBlock: "172.31.0.0/16",
|
|
218
153
|
* vpcId: _default.id,
|
|
219
|
-
* awsAccountId:
|
|
154
|
+
* awsAccountId: AWS_ACCOUNT_ID,
|
|
220
155
|
* });
|
|
221
156
|
* // Accept the connection
|
|
222
|
-
* const awsPeer = new aws.
|
|
157
|
+
* const awsPeer = new aws.index.VpcPeeringConnectionAccepter("aws_peer", {
|
|
223
158
|
* vpcPeeringConnectionId: mongoPeer.connectionId,
|
|
224
159
|
* autoAccept: true,
|
|
225
160
|
* tags: {
|
|
226
|
-
*
|
|
161
|
+
* side: "Accepter",
|
|
227
162
|
* },
|
|
228
163
|
* });
|
|
229
164
|
* ```
|
|
230
|
-
* <!--End PulumiCodeChooser -->
|
|
231
|
-
*
|
|
232
|
-
* ### Example with GCP
|
|
233
|
-
* <!--Start PulumiCodeChooser -->
|
|
234
|
-
* ```typescript
|
|
235
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
236
|
-
* import * as gcp from "@pulumi/gcp";
|
|
237
|
-
* import * as mongodbatlas from "@pulumi/mongodbatlas";
|
|
238
|
-
*
|
|
239
|
-
* // Create an Atlas cluster, this creates a container if one
|
|
240
|
-
* // does not yet exist for this GCP
|
|
241
|
-
* const testCluster = new mongodbatlas.Cluster("testCluster", {
|
|
242
|
-
* projectId: local.project_id,
|
|
243
|
-
* clusterType: "REPLICASET",
|
|
244
|
-
* replicationSpecs: [{
|
|
245
|
-
* numShards: 1,
|
|
246
|
-
* regionsConfigs: [{
|
|
247
|
-
* regionName: "US_EAST_2",
|
|
248
|
-
* electableNodes: 3,
|
|
249
|
-
* priority: 7,
|
|
250
|
-
* readOnlyNodes: 0,
|
|
251
|
-
* }],
|
|
252
|
-
* }],
|
|
253
|
-
* autoScalingDiskGbEnabled: true,
|
|
254
|
-
* mongoDbMajorVersion: "4.2",
|
|
255
|
-
* providerName: "GCP",
|
|
256
|
-
* providerInstanceSizeName: "M10",
|
|
257
|
-
* });
|
|
258
|
-
* // Create the peering connection request
|
|
259
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("testNetworkPeering", {
|
|
260
|
-
* projectId: local.project_id,
|
|
261
|
-
* atlasCidrBlock: "192.168.0.0/18",
|
|
262
|
-
* containerId: testCluster.containerId,
|
|
263
|
-
* providerName: "GCP",
|
|
264
|
-
* gcpProjectId: local.GCP_PROJECT_ID,
|
|
265
|
-
* networkName: "default",
|
|
266
|
-
* });
|
|
267
|
-
* const default = gcp.compute.getNetwork({
|
|
268
|
-
* name: "default",
|
|
269
|
-
* });
|
|
270
|
-
* // Create the GCP peer
|
|
271
|
-
* const peering = new gcp.compute.NetworkPeering("peering", {
|
|
272
|
-
* network: _default.then(_default => _default.selfLink),
|
|
273
|
-
* peerNetwork: pulumi.interpolate`https://www.googleapis.com/compute/v1/projects/${testNetworkPeering.atlasGcpProjectId}/global/networks/${testNetworkPeering.atlasVpcName}`,
|
|
274
|
-
* });
|
|
275
|
-
* ```
|
|
276
|
-
* <!--End PulumiCodeChooser -->
|
|
277
165
|
*
|
|
278
166
|
* ### Example with Azure
|
|
279
167
|
*
|
|
280
|
-
* <!--Start PulumiCodeChooser -->
|
|
281
168
|
* ```typescript
|
|
282
169
|
* import * as pulumi from "@pulumi/pulumi";
|
|
283
170
|
* import * as mongodbatlas from "@pulumi/mongodbatlas";
|
|
@@ -286,8 +173,9 @@ const utilities = require("./utilities");
|
|
|
286
173
|
* // see https://docs.atlas.mongodb.com/security-vpc-peering/
|
|
287
174
|
* // Create an Atlas cluster, this creates a container if one
|
|
288
175
|
* // does not yet exist for this AZURE region
|
|
289
|
-
* const
|
|
290
|
-
* projectId:
|
|
176
|
+
* const test = new mongodbatlas.Cluster("test", {
|
|
177
|
+
* projectId: projectId,
|
|
178
|
+
* name: "cluster-azure",
|
|
291
179
|
* clusterType: "REPLICASET",
|
|
292
180
|
* replicationSpecs: [{
|
|
293
181
|
* numShards: 1,
|
|
@@ -304,17 +192,16 @@ const utilities = require("./utilities");
|
|
|
304
192
|
* providerInstanceSizeName: "M10",
|
|
305
193
|
* });
|
|
306
194
|
* // Create the peering connection request
|
|
307
|
-
* const testNetworkPeering = new mongodbatlas.NetworkPeering("
|
|
308
|
-
* projectId:
|
|
309
|
-
* containerId:
|
|
195
|
+
* const testNetworkPeering = new mongodbatlas.NetworkPeering("test", {
|
|
196
|
+
* projectId: projectId,
|
|
197
|
+
* containerId: test.containerId,
|
|
310
198
|
* providerName: "AZURE",
|
|
311
|
-
* azureDirectoryId:
|
|
312
|
-
* azureSubscriptionId:
|
|
313
|
-
* resourceGroupName:
|
|
314
|
-
* vnetName:
|
|
199
|
+
* azureDirectoryId: AZURE_DIRECTORY_ID,
|
|
200
|
+
* azureSubscriptionId: AZURE_SUBSCRIPTION_ID,
|
|
201
|
+
* resourceGroupName: AZURE_RESOURCE_GROUP_NAME,
|
|
202
|
+
* vnetName: AZURE_VNET_NAME,
|
|
315
203
|
* });
|
|
316
204
|
* ```
|
|
317
|
-
* <!--End PulumiCodeChooser -->
|
|
318
205
|
*
|
|
319
206
|
* ## Import
|
|
320
207
|
*
|
package/networkPeering.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkPeering.js","sourceRoot":"","sources":["../networkPeering.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"networkPeering.js","sourceRoot":"","sources":["../networkPeering.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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