Skip to content
Merged
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
8 changes: 6 additions & 2 deletions compute/api/create_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ def list_instances(compute, project, zone):

# [START create_instance]
def create_instance(compute, project, zone, name, bucket):
source_disk_image = \
"projects/debian-cloud/global/images/debian-7-wheezy-v20150320"
# Get the latest Debian Jessie image.
image_response = compute.images().getFromFamily(
project='debian-cloud', family='debian-8').execute()
source_disk_image = image_response['selfLink']

# Configure the machine
machine_type = "zones/%s/machineTypes/n1-standard-1" % zone
startup_script = open(
os.path.join(
Expand Down