You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After you create the files, navigate to each application and environment pair's directory and run the following
177
+
command to initialize Terraform:
178
+
179
+
.. code-block::
180
+
181
+
terraform init
182
+
183
+
Run the following command to view the Terraform plan:
184
+
185
+
.. code-block::
186
+
187
+
terraform plan
188
+
189
+
Run the following command to create one project and one deployment for the application and environment pair. The command uses the files and the |service-terraform| to
190
+
create the projects and clusters:
191
+
192
+
.. code-block::
193
+
194
+
terraform apply
195
+
196
+
When prompted, type ``yes`` and press :kbd:`Enter` to apply
197
+
the configuration.
198
+
199
+
.. tab:: Staging and Prod Environments
200
+
:tabid: stagingprod
201
+
202
+
For your staging and production environments, create the
203
+
following files for each application and environment
204
+
pair. Place the files for each application and environment
205
+
pair in their own directory. Change the IDs and names to use your values:
After you create the files, navigate to each application and environment pair's directory and run the following
228
+
command to initialize Terraform:
229
+
230
+
.. code-block::
231
+
232
+
terraform init
233
+
234
+
Run the following command to view the Terraform plan:
235
+
236
+
.. code-block::
237
+
238
+
terraform plan
239
+
240
+
Run the following command to create one project and one deployment for the application and environment pair. The command uses the files and the |service-terraform| to
241
+
create the projects and clusters:
242
+
243
+
.. code-block::
244
+
245
+
terraform apply
246
+
247
+
When prompted, type ``yes`` and press :kbd:`Enter` to apply
248
+
the configuration.
249
+
250
+
For more configuration options and info about this example,
251
+
see |service-terraform| and the `MongoDB Terraform Blog Post
0 commit comments