mitchellh / vagrant-google

Vagrant provider for GCE.
Apache License 2.0
334 stars 100 forks source link

Fix shielded api #249

Closed Temikus closed 3 years ago

Temikus commented 3 years ago

There was a small issue introduced in #248 that I didn't notice, which resulted in following errors running any non-shielded VM image:

stderr: /Users/temikus/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/google-api-client-0.50.0/lib/google/apis/core/http_command.rb:228:in `check_status': invalid: Invalid value for field 'resource.shieldedInstanceConfig': '{  "enableSecureBoot": false,  "enableVtpm": false,  "enableIntegrityMonitoring": false}'. Shielded VM Config can only be set when using a UEFI-compatible disk. (Google::Apis::ClientError)

Seems like the API just looks at the presence of the container and doesn't actually look into any of its' fields ¯_(ツ)_/¯

lcy0321 commented 3 years ago

I'm sorry for this issue, I didn't notice that the API would reject shieldedInstanceConfig in non-shielded VM, even if all the value are set to false

Temikus commented 3 years ago

@lcy0321 Nothing to apologise about. That’s IMO incorrect API behaviour.