Skip to content

Instantly share code, notes, and snippets.

@ryan-lane
Last active May 27, 2017 03:12
Show Gist options
  • Save ryan-lane/6d9134743e04366b387057ec36214a33 to your computer and use it in GitHub Desktop.
Save ryan-lane/6d9134743e04366b387057ec36214a33 to your computer and use it in GitHub Desktop.
Resource managing sub-resource example
Ensure {{ grains.workers.web.cluster_name }} elb exists:
boto_elb.present:
- name: {{ grains.workers.web.cluster_name }}
- listeners:
- elb_port: 80
instance_port: 80
elb_protocol: HTTP
- elb_port: 443
instance_port: 80
elb_protocol: HTTPS
instance_protocol: HTTP
certificate: 'arn:aws:acm:us-east-1:{{ pillar.aws_account_id }}:certificate/4ecc3811-1d89-4fdf-ae0b-04163ffc546c'
- health_check:
target: 'TCP:80'
- subnets: {{ pillar.vpc.vpc_subnets }}
- security_groups:
- elb-external
- cnames:
- name: blog.{{ pillar.domain }}.
zone: {{ pillar.domain }}.
- name: rss.{{ pillar.domain }}.
zone: {{ pillar.domain }}.
- name: www.{{ pillar.domain }}.
zone: {{ pillar.domain }}.
- profile: primary_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment