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 of TargetLifecycleHook that creates a CloudFormation stack based on a provided CloudFormation template file.
Author:
avasquez
  • Field Details

    • CONFIG_KEY_STACK_NAME

      protected static final String CONFIG_KEY_STACK_NAME
      See Also:
    • CONFIG_KEY_TEMPLATE_FILENAME

      protected static final String CONFIG_KEY_TEMPLATE_FILENAME
      See Also:
    • CONFIG_KEY_TEMPLATE_PARAMS

      protected static final String CONFIG_KEY_TEMPLATE_PARAMS
      See Also:
    • CONFIG_KEY_STACK_CAPABILITIES

      protected static final String CONFIG_KEY_STACK_CAPABILITIES
      See Also:
    • 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<software.amazon.awssdk.services.cloudformation.model.Parameter> templateParams
    • stackCapabilities

      protected List<software.amazon.awssdk.services.cloudformation.model.Capability> stackCapabilities
  • Constructor Details

    • CreateCloudFormationLifecycleHook

      public CreateCloudFormationLifecycleHook()
  • Method Details

    • 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 class AbstractLifecycleHook
      Throws:
      org.craftercms.commons.config.ConfigurationException
    • doExecute

      public void doExecute(Target target) throws DeployerException
      Specified by:
      doExecute in class AbstractLifecycleHook
      Throws:
      DeployerException
    • createCloudFormationStack

      protected void createCloudFormationStack(software.amazon.awssdk.services.cloudformation.CloudFormationClient cloudFormation) throws DeployerException
      Throws:
      DeployerException
    • getTemplateBody

      protected String getTemplateBody() throws DeployerException
      Throws:
      DeployerException