Create a gist now

Instantly share code, notes, and snippets.

@scoates /boto_custom.py Secret
Created Sep 28, 2015

What would you like to do?
_states/
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(
'ModifySubnetAttribute',
{'SubnetId': subnet_id, 'MapPublicIpOnLaunch.Value': 'true'},
verb='POST')
ec2_conn.APIVersion = orig_api_version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment