salt.states.boto_cloudfront

Manage CloudFront distributions

New in version Oxygen.

Create, update and destroy CloudFront distributions.

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 here.

If IAM roles are not used you need to specify them, either in a pillar file or in the minion's config file:

cloudfront.keyid: GKTADJGHEIQSXMKKRBJ08H
cloudfront.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

It's also possible to specify key, keyid, and region via a profile, either passed in as a dict, or a string to pull from pillars or minion config:

myprofile:
    keyid: GKTADJGHEIQSXMKKRBJ08H
    key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
    region: us-east-1
aws:
    region:
        us-east-1:
            profile:
                keyid: GKTADJGHEIQSXMKKRBJ08H
                key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
                region: us-east-1
depends:boto3
salt.states.boto_cloudfront.present(name, config, tags, region=None, key=None, keyid=None, profile=None)

Ensure the CloudFront distribution is present.

name (string)
Name of the CloudFront distribution
config (dict)
Configuration for the distribution
tags (dict)
Tags to associate with the distribution
region (string)
Region to connect to
key (string)
Secret key to use
keyid (string)
Access key to use
profile (dict or string)
A dict with region, key, and keyid, or a pillar key (string) that contains such a dict.

Example:

Manage my_distribution CloudFront distribution:
    boto_cloudfront.present:
      - name: my_distribution
      - config:
          Comment: 'partial config shown, most parameters elided'
          Enabled: True
      - tags:
          testing_key: testing_value