Last active
September 7, 2020 00:20
-
-
Save halkyon/07d4dd932d567ff6a1571dec4afc817e to your computer and use it in GitHub Desktop.
Patch for salt-cloud digitalocean integration to support setting VPC for private networking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/lib/python3/dist-packages/salt/cloud/clouds/digitalocean.py 2020-09-07 11:02:31.000000000 +1200 | |
+++ /usr/lib/python3/dist-packages/salt/cloud/clouds/digitalocean_new.py 2020-09-07 11:04:47.000000000 +1200 | |
@@ -357,6 +357,11 @@ | |
if not isinstance(private_networking, bool): | |
raise SaltCloudConfigError("'private_networking' should be a boolean value.") | |
kwargs['private_networking'] = private_networking | |
+ vpc_uuid = config.get_cloud_config_value( | |
+ "vpc_uuid", vm_, __opts__, search_global=False, default=None, | |
+ ) | |
+ if vpc_uuid is not None: | |
+ kwargs["vpc_uuid"] = vpc_uuid | |
if not private_networking and ssh_interface == 'private': | |
raise SaltCloudConfigError( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment