Skip to content

Commit c828847

Browse files
nikhil-mongoNikhil Singh
andauthored
update resources documentation to address INTMDB-225 (#503)
* update resources documentation to address INTMDB-225 * update based on change requested Co-authored-by: Nikhil Singh <[email protected]>
1 parent 7f6ab7c commit c828847

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

website/docs/r/network_peering.html.markdown

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ resource "aws_vpc_peering_connection_accepter" "peer" {
8383
# Container example provided but not always required,
8484
# see network_container documentation for details.
8585
resource "mongodbatlas_network_container" "test" {
86-
project_id = "${local.project_id}"
86+
project_id = local.project_id
8787
atlas_cidr_block = "10.8.0.0/21"
8888
provider_name = "GCP"
8989
}
9090
9191
# Create the peering connection request
9292
resource "mongodbatlas_network_peering" "test" {
93-
project_id = "${local.project_id}"
94-
container_id = "${mongodbatlas_network_container.test.container_id}"
93+
project_id = local.project_id
94+
container_id = mongodbatlas_network_container.test.container_id
9595
provider_name = "GCP"
96-
gcp_project_id = "${local.GCP_PROJECT_ID}"
96+
gcp_project_id = local.GCP_PROJECT_ID
9797
network_name = "default"
9898
}
9999
@@ -105,13 +105,13 @@ data "google_compute_network" "default" {
105105
# Create the GCP peer
106106
resource "google_compute_network_peering" "peering" {
107107
name = "peering-gcp-terraform-test"
108-
network = "${data.google_compute_network.default.self_link}"
108+
network = data.google_compute_network.default.self_link
109109
peer_network = "https://www.googleapis.com/compute/v1/projects/${mongodbatlas_network_peering.test.atlas_gcp_project_id}/global/networks/${mongodbatlas_network_peering.test.atlas_vpc_name}"
110110
}
111111
112112
# Create the cluster once the peering connection is completed
113113
resource "mongodbatlas_cluster" "test" {
114-
project_id = "${local.project_id}"
114+
project_id = local.project_id
115115
name = "terraform-manually-test"
116116
num_shards = 1
117117
disk_size_gb = 5
@@ -148,26 +148,27 @@ resource "mongodbatlas_cluster" "test" {
148148
# Container example provided but not always required,
149149
# see network_container documentation for details.
150150
resource "mongodbatlas_network_container" "test" {
151-
project_id = "${local.project_id}"
152-
atlas_cidr_block = "10.8.0.0/21"
151+
project_id = local.project_id
152+
atlas_cidr_block = local.ATLAS_CIDR_BLOCK
153153
provider_name = "AZURE"
154154
region = "US_EAST_2"
155155
}
156156
157157
# Create the peering connection request
158158
resource "mongodbatlas_network_peering" "test" {
159-
project_id = "${local.project_id}"
160-
container_id = "${mongodbatlas_network_container.test.container_id}"
159+
project_id = local.project_id
160+
container_id = mongodbatlas_network_container.test.container_id
161161
provider_name = "AZURE"
162-
azure_directory_id = "${local.AZURE_DIRECTORY_ID}"
163-
azure_subscription_id = "${local.AZURE_SUBSCRIPTION_ID}"
164-
resource_group_name = "${local.AZURE_RESOURCES_GROUP_NAME}"
165-
vnet_name = "${local.AZURE_VNET_NAME}"
162+
azure_directory_id = local.AZURE_DIRECTORY_ID
163+
azure_subscription_id = local.AZURE_SUBSCRIPTION_ID
164+
resource_group_name = local.AZURE_RESOURCES_GROUP_NAME
165+
vnet_name = local.AZURE_VNET_NAME
166+
atlas_cidr_block = mongodbatlas_network_container.test.atlas_cidr_block
166167
}
167168
168169
# Create the cluster once the peering connection is completed
169170
resource "mongodbatlas_cluster" "test" {
170-
project_id = "${local.project_id}"
171+
project_id = local.project_id
171172
name = "terraform-manually-test"
172173
num_shards = 1
173174
@@ -259,7 +260,7 @@ resource "mongodbatlas_cluster" "test" {
259260
260261
# Create the peering connection request
261262
resource "mongodbatlas_network_peering" "test" {
262-
project_id = "${local.project_id}"
263+
project_id = local.project_id
263264
atlas_cidr_block = "192.168.0.0/18"
264265
265266
container_id = mongodbatlas_cluster.test.container_id
@@ -313,6 +314,7 @@ resource "mongodbatlas_network_peering" "test" {
313314
azure_subscription_id = local.AZURE_SUBSCRIPTION_ID
314315
resource_group_name = local.AZURE_RESOURCE_GROUP_NAME
315316
vnet_name = local.AZURE_VNET_NAME
317+
atlas_cidr_block = local.ATLAS_CIDR_BLOCK
316318
}
317319
```
318320

0 commit comments

Comments
 (0)