-
-
Save scoates/8d45c759bbd0a4b07b7c to your computer and use it in GitHub Desktop.
_states/
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
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