Class CreateCloudFormationLifecycleHook
- java.lang.Object
-
- org.craftercms.deployer.impl.lifecycle.AbstractLifecycleHook
-
- org.craftercms.deployer.impl.lifecycle.aws.CreateCloudFormationLifecycleHook
-
- All Implemented Interfaces:
TargetLifecycleHook
,InitializableByConfigBean
public class CreateCloudFormationLifecycleHook extends AbstractLifecycleHook
Implementation ofTargetLifecycleHook
that creates a CloudFormation stack based on a provided CloudFormation template file.- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description protected AwsClientBuilderConfigurer
builderConfigurer
protected static String
CONFIG_KEY_STACK_NAME
protected static String
CONFIG_KEY_TEMPLATE_FILENAME
protected static String
CONFIG_KEY_TEMPLATE_PARAMS
protected String
stackName
protected String
templateFilename
protected Collection<com.amazonaws.services.cloudformation.model.Parameter>
templateParams
protected org.springframework.core.io.Resource
templatesOverrideResource
protected org.springframework.core.io.Resource
templatesResource
-
Fields inherited from class org.craftercms.deployer.impl.lifecycle.AbstractLifecycleHook
CONFIG_KEY_DISABLED, disabled, logger
-
-
Constructor Summary
Constructors Constructor Description CreateCloudFormationLifecycleHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createCloudFormationStack(com.amazonaws.services.cloudformation.AmazonCloudFormation cloudFormation)
void
doExecute(Target target)
void
doInit(org.apache.commons.configuration2.Configuration config)
protected String
getTemplateBody()
void
setTemplatesOverrideResource(org.springframework.core.io.Resource templatesOverrideResource)
void
setTemplatesResource(org.springframework.core.io.Resource templatesResource)
-
Methods inherited from class org.craftercms.deployer.impl.lifecycle.AbstractLifecycleHook
execute, init
-
-
-
-
Field Detail
-
CONFIG_KEY_STACK_NAME
protected static final String CONFIG_KEY_STACK_NAME
- See Also:
- Constant Field Values
-
CONFIG_KEY_TEMPLATE_FILENAME
protected static final String CONFIG_KEY_TEMPLATE_FILENAME
- See Also:
- Constant Field Values
-
CONFIG_KEY_TEMPLATE_PARAMS
protected static final String CONFIG_KEY_TEMPLATE_PARAMS
- See Also:
- Constant Field Values
-
templatesResource
protected org.springframework.core.io.Resource templatesResource
-
templatesOverrideResource
protected org.springframework.core.io.Resource templatesOverrideResource
-
builderConfigurer
protected AwsClientBuilderConfigurer builderConfigurer
-
stackName
protected String stackName
-
templateFilename
protected String templateFilename
-
templateParams
protected Collection<com.amazonaws.services.cloudformation.model.Parameter> templateParams
-
-
Method Detail
-
setTemplatesResource
public void setTemplatesResource(org.springframework.core.io.Resource templatesResource)
-
setTemplatesOverrideResource
public void setTemplatesOverrideResource(org.springframework.core.io.Resource templatesOverrideResource)
-
doInit
public void doInit(org.apache.commons.configuration2.Configuration config) throws org.craftercms.commons.config.ConfigurationException
- Specified by:
doInit
in classAbstractLifecycleHook
- Throws:
org.craftercms.commons.config.ConfigurationException
-
doExecute
public void doExecute(Target target) throws DeployerException
- Specified by:
doExecute
in classAbstractLifecycleHook
- Throws:
DeployerException
-
createCloudFormationStack
protected void createCloudFormationStack(com.amazonaws.services.cloudformation.AmazonCloudFormation cloudFormation) throws DeployerException
- Throws:
DeployerException
-
getTemplateBody
protected String getTemplateBody() throws DeployerException
- Throws:
DeployerException
-
-