@@ -182,41 +182,36 @@ content: |
182
182
- IP address or CIDR block from which your |service| cluster is
183
183
accessible.
184
184
185
- .. admonition:: Use an Input Variables File to Maximize security
186
- :class: admonition-example
185
+ .. example:: Use an Input Variables File to Maximize security
187
186
188
187
To maximize security, consider taking the following steps:
189
188
190
189
a. Define the ``local`` variables in an `input variables
191
190
<https://learn.hashicorp.com/terraform/getting-started/variables.html>`__
192
191
file.
193
192
194
- .. example::
193
+ .. code-block:: none
195
194
196
- .. code-block:: none
195
+ variable "mongodb_atlas_api_pub_key" {
196
+ default = "my-public-key"
197
+ }
197
198
198
- variable "mongodb_atlas_api_pub_key" {
199
- default = "my-public-key"
200
- }
201
-
202
- variable "mongodb_atlas_api_pri_key" {
203
- default = "my-private-key"
204
- }
199
+ variable "mongodb_atlas_api_pri_key" {
200
+ default = "my-private-key"
201
+ }
205
202
206
203
#. Exclude the input variables file from your repository. For
207
204
example, add the filename to the ``.gitignore`` file for your
208
205
repository.
209
206
#. Reference variables from the input variables file in the
210
207
``main.tf`` file by prefacing them with ``vars.``.
211
208
212
- .. example::
213
-
214
- .. code-block:: none
209
+ .. code-block:: none
215
210
216
- provider "mongodbatlas" {
217
- public_key = vars.mongodb_atlas_api_pub_key
218
- private_key = vars.mongodb_atlas_api_pri_key
219
- }
211
+ provider "mongodbatlas" {
212
+ public_key = vars.mongodb_atlas_api_pub_key
213
+ private_key = vars.mongodb_atlas_api_pri_key
214
+ }
220
215
---
221
216
title : " Add optional configuration options to the ``main.tf`` file."
222
217
level : 4
0 commit comments