From 8b773e13ff78adb3b0660c6a118f5f78c3e38d85 Mon Sep 17 00:00:00 2001 From: Steven Michaels Date: Fri, 19 Jun 2020 13:54:00 -0500 Subject: [PATCH] digital_ocean_droplet: Add new vpc_uuid option (#475) * Add vpc_uuid option to droplet creation * Include new vpc_uuid option digital_ocean_droplet * Remove required, add type for vpc_uuid Co-authored-by: Felix Fontein * Create changelog fragment file * Include version_added Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../fragments/475-digital_ocean_droplet-add-vpcuuid.yaml | 2 ++ .../modules/cloud/digital_ocean/digital_ocean_droplet.py | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 changelogs/fragments/475-digital_ocean_droplet-add-vpcuuid.yaml diff --git a/changelogs/fragments/475-digital_ocean_droplet-add-vpcuuid.yaml b/changelogs/fragments/475-digital_ocean_droplet-add-vpcuuid.yaml new file mode 100644 index 0000000000..397881bd7d --- /dev/null +++ b/changelogs/fragments/475-digital_ocean_droplet-add-vpcuuid.yaml @@ -0,0 +1,2 @@ +minor_changes: + - digital_ocean_droplet - add support for new vpc_uuid parameter diff --git a/plugins/modules/cloud/digital_ocean/digital_ocean_droplet.py b/plugins/modules/cloud/digital_ocean/digital_ocean_droplet.py index 2c1e489db0..227d5e0b42 100644 --- a/plugins/modules/cloud/digital_ocean/digital_ocean_droplet.py +++ b/plugins/modules/cloud/digital_ocean/digital_ocean_droplet.py @@ -54,6 +54,12 @@ options: - add an additional, private network interface to droplet for inter-droplet communication. default: False type: bool + vpc_uuid: + description: + - A string specifying the UUID of the VPC to which the Droplet will be assigned. If excluded, Droplet will be + assigned to the account's default VPC for the region. + type: str + version_added: 0.2.0 user_data: description: - opaque blob of data which is made available to the droplet @@ -317,6 +323,7 @@ def main(): region=dict(aliases=['region_id']), ssh_keys=dict(type='list'), private_networking=dict(type='bool', default=False), + vpc_uuid=dict(type='str'), backups=dict(type='bool', default=False), monitoring=dict(type='bool', default=False), id=dict(aliases=['droplet_id'], type='int'),