forked from NeCTAR-RC/heat-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswift.yaml
36 lines (30 loc) · 1.23 KB
/
swift.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# http://docs.openstack.org/developer/heat/template_guide/hot_spec.html#heat-template-version
heat_template_version: 2014-10-16
description: >
A template to show Swift in action.
Note if you upload the file named index.html into the resultant container, making sure to preservie its
complete name, ('index.html'), the output url given by this template will return it.
However, if you forget to delete index.html from the container before you delete the stack,
the stack will not delete, reporting an error.
The take away is that you have to make sure that the container is empty before you delete the stack.
resources:
swift_container:
# http://docs.openstack.org/hot-reference/content/OS__Swift__Container.html
type: OS::Swift::Container
deletion_policy: Delete
properties:
X-Container-Read: ".r:*"
X-Container-Meta:
Web-Index: index.html
Web-Error: error.html
outputs:
index_url:
description: "URL for index page hosted on S3 :"
value:
str_replace:
template: the_url/index.html
params:
the_url: { get_attr: [ swift_container, WebsiteURL ] }
domain_name:
description: "Domain of Swift host: "
value: { get_attr: [swift_container, DomainName] }