From d1b3cb40434135cf9fd207effd6397d9aecaebaa Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 17 Jan 2013 11:13:48 +0000 Subject: [PATCH] heat templates : add missing credentials to IHA template WordPress_Single_Instance_With_IHA lacks credentials so cfn-push-stats can't authenticate with the cloudwatch api ref bug 1100719 Change-Id: I218eea927a00b6cef58a4a1ee5d930c57ebb8a2e Signed-off-by: Steven Hardy --- ...ordPress_Single_Instance_With_IHA.template | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/templates/WordPress_Single_Instance_With_IHA.template b/templates/WordPress_Single_Instance_With_IHA.template index 1159c1a3..e0022696 100644 --- a/templates/WordPress_Single_Instance_With_IHA.template +++ b/templates/WordPress_Single_Instance_With_IHA.template @@ -97,6 +97,15 @@ }, "Resources" : { + "CfnUser" : { + "Type" : "AWS::IAM::User" + }, + "WebServerKeys" : { + "Type" : "AWS::IAM::AccessKey", + "Properties" : { + "UserName" : {"Ref": "CfnUser"} + } + }, "WebServerRestartPolicy" : { "Type" : "HEAT::HA::Restarter", "Properties" : { @@ -123,6 +132,16 @@ "AWS::CloudFormation::Init" : { "config" : { "files" : { + "/etc/cfn/cfn-credentials" : { + "content" : { "Fn::Join" : ["", [ + "AWSAccessKeyId=", { "Ref" : "WebServerKeys" }, "\n", + "AWSSecretKey=", {"Fn::GetAtt": ["WebServerKeys", + "SecretAccessKey"]}, "\n" + ]]}, + "mode" : "000400", + "owner" : "root", + "group" : "root" + }, "/tmp/cfn-hup-crontab.txt" : { "content" : { "Fn::Join" : ["", [ "MAIL=\"\"\n", -- 2.45.2