Browse code

Use default network in Google Cloud Platform Guide (#68846)

* Update guide_gce.rst
The given example is not working as a SSH connection is not possible because of #59573. Instead, in this tutorial the default network should be used which allows SSH connections in most cases.

Co-authored-by: Sandra McCann <samccann@redhat.com>

Philipp Schmiedel authored on 2020/06/17 03:15:11
Showing 1 changed files
... ...
@@ -157,11 +157,11 @@ Create an instance
157 157
 The full range of GCP modules provide the ability to create a wide variety of
158 158
 GCP resources with the full support of the entire GCP API.
159 159
 
160
-The following playbook creates a GCE Instance. This instance relies on a GCP
161
-network and a Disk. By creating the Disk and Network separately, we can give as
162
-much detail as necessary about how we want the disk and network formatted. By
163
-registering a Disk/Network to a variable, we can simply insert the variable
164
-into the instance task. The gcp_compute_instance module will figure out the
160
+The following playbook creates a GCE Instance. This instance relies on other GCP
161
+resources like Disk. By creating other resources separately, we can give as
162
+much detail as necessary about how we want to configure the other resources, for example
163
+formatting of the Disk. By registering it to a variable, we can simply insert the 
164
+variable into the instance task. The gcp_compute_instance module will figure out the
165 165
 rest.
166 166
 
167 167
 .. code-block:: yaml
... ...
@@ -190,16 +190,6 @@ rest.
190 190
               - https://www.googleapis.com/auth/compute
191 191
             state: present
192 192
         register: disk
193
-      - name: create a network
194
-        gcp_compute_network:
195
-            name: 'network-instance'
196
-            project: "{{ gcp_project }}"
197
-            auth_kind: "{{ gcp_cred_kind }}"
198
-            service_account_file: "{{ gcp_cred_file }}"
199
-            scopes:
200
-              - https://www.googleapis.com/auth/compute
201
-            state: present
202
-        register: network
203 193
       - name: create a address
204 194
         gcp_compute_address:
205 195
             name: 'address-instance'
... ...
@@ -221,7 +211,7 @@ rest.
221 221
                 boot: true
222 222
                 source: "{{ disk }}"
223 223
             network_interfaces:
224
-                - network: "{{ network }}"
224
+                - network: null # use default
225 225
                   access_configs:
226 226
                     - name: 'External NAT'
227 227
                       nat_ip: "{{ address }}"