Instantly share code, notes, and snippets.

@scoates / Secret
Created Sep 28, 2015

What would you like to do?
from salt.utils import boto
## other stuff including def virtual()
def ensure_public_ips(…):
ec2_conn = boto.get_connection('ec2', region=region, key=key, keyid=keyid, profile=profile)
orig_api_version = ec2_conn.APIVersion
ec2_conn.APIVersion = '2014-06-15'
ret['result'] = ec2_conn.get_status(
{'SubnetId': subnet_id, 'MapPublicIpOnLaunch.Value': 'true'},
ec2_conn.APIVersion = orig_api_version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment