added hostname on compute instances (#356)

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
The Magician 2019-08-16 14:34:37 -07:00 committed by Alex Stephen
parent 92917e2b2d
commit 1c906b1c2c
2 changed files with 28 additions and 0 deletions

View file

@ -223,6 +223,15 @@ options:
- Full or partial URL of the accelerator type resource to expose to this instance.
required: false
type: str
hostname:
description:
- The hostname of the instance to be created. The specified hostname must be RFC1035
compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal
when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal
when using zonal DNS.
required: false
type: str
version_added: 2.9
labels:
description:
- Labels to apply to this instance. A list of key->value pairs.
@ -707,6 +716,14 @@ guestAccelerators:
- Full or partial URL of the accelerator type resource to expose to this instance.
returned: success
type: str
hostname:
description:
- The hostname of the instance to be created. The specified hostname must be RFC1035
compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal
when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal
when using zonal DNS.
returned: success
type: str
id:
description:
- The unique identifier for the resource. This identifier is defined by the server.
@ -996,6 +1013,7 @@ def main():
),
),
guest_accelerators=dict(type='list', elements='dict', options=dict(accelerator_count=dict(type='int'), accelerator_type=dict(type='str'))),
hostname=dict(type='str'),
labels=dict(type='dict'),
metadata=dict(type='dict'),
machine_type=dict(type='str'),
@ -1114,6 +1132,7 @@ def resource_to_request(module):
u'deletionProtection': module.params.get('deletion_protection'),
u'disks': InstanceDisksArray(module.params.get('disks', []), module).to_request(),
u'guestAccelerators': InstanceGuestacceleratorsArray(module.params.get('guest_accelerators', []), module).to_request(),
u'hostname': module.params.get('hostname'),
u'labels': module.params.get('labels'),
u'metadata': module.params.get('metadata'),
u'machineType': machine_type_selflink(module.params.get('machine_type'), module.params),
@ -1200,6 +1219,7 @@ def response_to_hash(module, response):
u'deletionProtection': response.get(u'deletionProtection'),
u'disks': InstanceDisksArray(module.params.get('disks', []), module).to_request(),
u'guestAccelerators': InstanceGuestacceleratorsArray(response.get(u'guestAccelerators', []), module).from_response(),
u'hostname': response.get(u'hostname'),
u'id': response.get(u'id'),
u'labelFingerprint': response.get(u'labelFingerprint'),
u'labels': response.get(u'labels'),

View file

@ -258,6 +258,14 @@ resources:
instance.
returned: success
type: str
hostname:
description:
- The hostname of the instance to be created. The specified hostname must be
RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal
when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal
when using zonal DNS.
returned: success
type: str
id:
description:
- The unique identifier for the resource. This identifier is defined by the