File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/boto_cfn.cpython-310.pyc
o
�N�g�- � @ s� d Z ddlZddlm mZ ddlZddlZe� e
�ZdZdd� Z
ddd�Zddd �Zd
d� Z ddd
�Zdd� ZdS )ah
Connection module for Amazon Cloud Formation
.. versionadded:: 2015.8.0
:depends: boto
:configuration: This module accepts explicit AWS credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no further
configuration is necessary. More Information available at
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
If IAM roles are not used you need to specify them either in a pillar or
in the minion's config file:
.. code-block:: yaml
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
.. code-block:: yaml
stack-present:
boto_cfn.present:
- name: mystack
- template_body: salt://base/mytemplate.json
- disable_rollback: true
- region: eu-west-1
- keyid: 'AKIAJHTMIQ2ASDFLASDF'
- key: 'fdkjsafkljsASSADFalkfjasdf'
.. code-block:: yaml
stack-absent:
boto_cfn.absent:
- name: mystack
� NZboto_cfnc C s dt v rdS ddt� d�fS )zF
Only load if elementtree xml library and boto are available.
�boto_cfn.existsTFzCannot load z# state: boto_cfn module unavailable)�__salt__�__virtualname__� r r �H/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/boto_cfn.py�__virtual__2 s
�r c C st | ddi d�}t || �}t |
| �}
t |
| �}
||
|
fD ]}t|t�r&| S qt||||||�}t�d|� |durL|\}}d|d<