Skip to content

Commit 4fa2ddf

Browse files
author
cmgsj
committed
print error when omiting external IP and not using internal one
1 parent 0197231 commit 4fa2ddf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

post-processor/googlecompute-export/post-processor.go

+5
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
102102
errs, fmt.Errorf("paths must be specified"))
103103
}
104104

105+
if p.config.OmitExternalIP && !p.config.UseInternalIP {
106+
errs = packersdk.MultiErrorAppend(
107+
errs, fmt.Errorf("'use_internal_ip' must be true if 'omit_external_ip' is true"))
108+
}
109+
105110
// Set defaults.
106111
if p.config.DiskSizeGb == 0 {
107112
p.config.DiskSizeGb = 200

0 commit comments

Comments
 (0)