Skip to content

Commit f3cf6e2

Browse files
Assign a public IP to the build machine by default
When building using packer, assign a public IP (omit_external_ip = false) to the build machine by default. This matches the manual build process and makes building the image simpler when getting started. When "omit_external_ip = true" the GCP network will require that Cloud NAT is configured so that the build instance can fetch packages and source code from the public internet. Change-Id: I5abbbc72c3472ddb9ade2ecd3d9a31d67ff9a569
1 parent e6bb402 commit f3cf6e2

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

docs/changes/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Display Kernel and OS version information at end of packer build
55
* Fix proxy startup script always prints "Error starting proxy"
66
* Fix auto-reexporting the root of an NFS v4 server
7+
* Assign a public IP to the build machine by default
78

89
## Fetch Ubuntu Kernel source from launchpad
910

@@ -24,6 +25,12 @@ When exporting the root "/" of an NFS v4 server with AUTO_REEXPORT enabled; atte
2425

2526
This is because the logic that ensures the root export always has `fsid=0` was overriding the re-export logic. The updated logic correctly applies both conditions to the export.
2627

28+
## Assign a public IP to the build machine by default
29+
30+
When building using packer, assign a public IP (`omit_external_ip = false`) to the build machine by default. This matches the manual build process and makes building the image simpler when getting started.
31+
32+
When `omit_external_ip = true` the GCP network will require that Cloud NAT is configured so that the build instance can fetch packages and source code from the public internet.
33+
2734
# v1.0.0-beta7
2835

2936
* Fix error applying Terraform when nodes greater than 1

image/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Create a packer variables file (e.g. `image.pkrvars.hcl`).
5050
* machine_type (string) - The machine type used to build the image. This can be increased to improve build speeds. Defaults to `"c2-standard-16"`.
5151
* network_project (string) - Project hosting the network when using shared VPC. Defaults to `project`.
5252
* subnetwork (string) - The subnetwork the compute instance will use. Defaults to `"default"`.
53-
* omit_external_ip (bool) - Use a private (internal) IP only. Defaults to `true`.
53+
* omit_external_ip (bool) - Use a private (internal) IP only. Defaults to `false`.
5454
* The subnetwork will require a NAT router in the region.
5555
* IAP tunnelling (default) or a VPN connection to the VPC network is required.
5656
* image_name (string) - The unique name of the resulting image. Defaults to `"{image_family}-{timestamp}"`.

image/variables.pkr.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ variable "subnetwork" {
3939

4040
variable "omit_external_ip" {
4141
type = bool
42-
default = true
42+
default = false
4343
}
4444

4545
variable "image_name" {

0 commit comments

Comments
 (0)