Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

add default empty settings for guest_accelerators and service_accounts #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/google/compute/property/instancetemplate_properties.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ class InstancTemplatPropert
attr_reader :service_accounts
attr_reader :tags

# set defaults for optional GCE instance template attributes
def guest_accelerators
@guest_accelerators || []
end

def service_accounts
@service_accounts || []
end

def to_json(_arg = nil)
{
'canIpForward' => can_ip_forward,
Expand Down