aboutsummaryrefslogtreecommitdiffstats
path: root/heat.yaml
diff options
context:
space:
mode:
authorClint Byrum <clint@fewbar.com>2013-04-18 15:23:07 -0700
committerClint Byrum <clint@fewbar.com>2013-04-18 15:23:07 -0700
commit72d250be0598aba3e9e9e09721cf99402ded0c91 (patch)
tree7b41ec00448988a173e78e70a30cc3cc3b4f8da3 /heat.yaml
parent41fb3c49045fd5dc6ae3ec013c51e8b8428d1fff (diff)
Refactor Heat template to use generic user
Diffstat (limited to 'heat.yaml')
-rw-r--r--heat.yaml43
1 files changed, 15 insertions, 28 deletions
diff --git a/heat.yaml b/heat.yaml
index 92f45744..0312a147 100644
--- a/heat.yaml
+++ b/heat.yaml
@@ -30,33 +30,20 @@ Parameters:
AvailabilityZones:
Type: List
Default: [ 1 ]
+ TemplateURL:
+ Type: String
+ Default: https://raw.github.com/openstack-ops/templates/master/
Resources:
- EngineAccessPolicy:
- Type: OS::Heat::AccessPolicy
- Properties:
- AllowedResources: [ HeatEngine ]
EngineUser:
- Type: AWS::IAM::User
- Properties:
- Policies: [ { Ref: EngineAccessPolicy } ]
- EngineKey:
- Type: AWS::IAM::AccessKey
- Properties:
- UserName:
- Ref: EngineUser
- ApiAccessPolicy:
- Type: OS::Heat::AccessPolicy
- Properties:
- AllowedResources: [ HeatAPILaunch ]
+ Type: AWS::CloudFormation::Stack
+ TemplateURL: {Fn::Join: [ {Ref: TemplateURL} , 'generic-user.yaml' ]}
+ Parameters:
+ AccessList: [ HeatEngine ]
ApiUser:
- Type: AWS::IAM::User
- Properties:
- Policies: [ { Ref: ApiAccessPolicy } ]
- ApiKey:
- Type: AWS::IAM::AccessKey
- Properties:
- UserName:
- Ref: ApiUser
+ Type: AWS::CloudFormation::Stack
+ TemplateURL: {Fn::Join: [ {Ref: TemplateURL} , 'generic-user.yaml' ]}
+ Parameters:
+ AccessList: [ HeatAPI, HeatAPILaunch ]
HeatAPILaunch:
Type: AWS::AutoScaling::LaunchConfiguration
Metadata:
@@ -67,9 +54,9 @@ Resources:
host: {Ref: RabbitMQHost}
password: {Ref: RabbitMQPassword}
access_key_id:
- Ref: ApiKey
+ Fn::GetAtt: [ ApiUser, AccessKeyId ]
secret_key:
- Fn::GetAtt: [ ApiKey, SecretAccessKey ]
+ Fn::GetAtt: [ ApiUser, SecretAccessKey ]
stack:
name: {Ref: 'AWS::StackName'}
region: {Ref: 'AWS::Region'}
@@ -99,9 +86,9 @@ Resources:
host: {Ref: RabbitMQHost}
password: {Ref: RabbitMQPassword}
access_key_id:
- Ref: EngineKey
+ Fn::GetAtt: [ EngineUser, AccessKeyId ]
secret_key:
- Fn::GetAtt: [ EngineKey, SecretAccessKey ]
+ Fn::GetAtt: [ EngineUser, SecretAccessKey ]
stack:
name: {Ref: 'AWS::StackName'}
region: {Ref: 'AWS::Region'}