Created
April 9, 2015 13:11
-
-
Save Vasu1105/50c8cb1003e3bb4859f4 to your computer and use it in GitHub Desktop.
Knife google bootstrap issue with --gce-public-ip set to 'none'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/chef/knife/google_server_create.rb b/lib/chef/knife/google_server_create.rb | |
index 2c8d2a2..c7f8309 100644 | |
--- a/lib/chef/knife/google_server_create.rb | |
+++ b/lib/chef/knife/google_server_create.rb | |
@@ -563,7 +563,7 @@ class Chef | |
network_interface.merge!('accessConfigs' =>[{"name"=>"External NAT", | |
"type"=>"ONE_TO_ONE_NAT", "natIP"=>config[:public_ip] }]) | |
elsif config[:public_ip] == 'NONE' | |
- # do nothing | |
+ config[:instance_connect_ip] = 'PRIVATE' | |
else | |
ui.error("Invalid public ip value : #{config[:public_ip]}") | |
exit 1 | |
@@ -585,7 +585,7 @@ class Chef | |
:tags => { 'items' => config[:tags] } | |
) | |
else | |
- zone_operation = client.instances.create(:name => @name_args.first, | |
+ zone_operation = client.instances.create(:name => @name_args.first, | |
:zone=> selflink2name(zone), | |
:machineType => machine_type, | |
:disks => disks, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment