def create_stack(self, fqn, template, parameters, tags,
                     force_change_set=False, stack_policy=None,
                     **kwargs):
        """Create a new Cloudformation stack.

        Args:
            fqn (str): The fully qualified name of the Cloudformation stack.
            template (:class:`stacker.providers.base.Template`): A Template
                object to use when creating the stack.
            parameters (list): A list of dictionaries that defines the
                parameter list to be applied to the Cloudformation stack.
            tags (list): A list of dictionaries that defines the tags
                that should be applied to the Cloudformation stack.
            force_change_set (bool): Whether or not to force change set use.
            stack_policy (:class:`stacker.providers.base.Template`): A template
                object representing a stack policy.
        """

        logger.debug("Attempting to create stack %s:.", fqn)
        logger.debug("    parameters: %s", parameters)
        logger.debug("    tags: %s", tags)
        if template.url:
            logger.debug("    template_url: %s", template.url)
        else:
            logger.debug("    no template url, uploading template "
                         "directly.")
        if force_change_set:
            logger.debug("force_change_set set to True, creating stack with "
                         "changeset.")
            _changes, change_set_id = create_change_set(
                self.cloudformation, fqn, template, parameters, tags,
                'CREATE', service_role=self.service_role, **kwargs
            )

            self.cloudformation.execute_change_set(
                ChangeSetName=change_set_id,
            )
        else:
            args = generate_cloudformation_args(
                fqn, parameters, tags, template,
                service_role=self.service_role,
                stack_policy=stack_policy,
            )

            try:
                self.cloudformation.create_stack(**args)
            except botocore.exceptions.ClientError as e:
                if e.response['Error']['Message'] == ('TemplateURL must '
                                                      'reference a valid S3 '
                                                      'object to which you '
                                                      'have access.'):
                    s3_fallback(fqn, template, parameters, tags,
                                self.cloudformation.create_stack,
                                self.service_role)
                else:
                    raise
def create_stack ( self , fqn , template , parameters , tags , force_change_set = False , stack_policy = None , ** kwargs ) : logger . debug ( "Attempting to create stack %s:." , fqn ) logger . debug ( "    parameters: %s" , parameters ) logger . debug ( "    tags: %s" , tags ) if template . url : logger . debug ( "    template_url: %s" , template . url ) else : logger . debug ( "    no template url, uploading template " "directly." ) if force_change_set : logger . debug ( "force_change_set set to True, creating stack with " "changeset." ) _changes , change_set_id = create_change_set ( self . cloudformation , fqn , template , parameters , tags , 'CREATE' , service_role = self . service_role , ** kwargs ) self . cloudformation . execute_change_set ( ChangeSetName = change_set_id , ) else : args = generate_cloudformation_args ( fqn , parameters , tags , template , service_role = self . service_role , stack_policy = stack_policy , ) try : self . cloudformation . create_stack ( ** args ) except botocore . exceptions . ClientError as e : if e . response [ 'Error' ] [ 'Message' ] == ( 'TemplateURL must ' 'reference a valid S3 ' 'object to which you ' 'have access.' ) : s3_fallback ( fqn , template , parameters , tags , self . cloudformation . create_stack , self . service_role ) else : raise
Create a new Cloudformation stack.

        Args:
            fqn (str): The fully qualified name of the Cloudformation stack.
            template (:class:`stacker.providers.base.Template`): A Template
                object to use when creating the stack.
            parameters (list): A list of dictionaries that defines the
                parameter list to be applied to the Cloudformation stack.
            tags (list): A list of dictionaries that defines the tags
                that should be applied to the Cloudformation stack.
            force_change_set (bool): Whether or not to force change set use.
            stack_policy (:class:`stacker.providers.base.Template`): A template
                object representing a stack policy.