Method: Formatron::CloudFormation.deploy

Defined in:
lib/formatron/cloud_formation.rb

.deploy(aws:, bucket:, name:, target:, parameters:) ⇒ Object

rubocop:disable Metrics/MethodLength



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/formatron/cloud_formation.rb', line 8

def self.deploy(aws:, bucket:, name:, target:, parameters:)
  stack_name = _stack_name name, target
  Formatron::LOG.info do
    "Deploy CloudFormation stack: #{stack_name}"
  end
  aws.deploy_stack(
    stack_name: stack_name,
    template_url: S3::CloudFormationTemplate.url(
      region: aws.region,
      bucket: bucket,
      name: name,
      target: target
    ),
    parameters: parameters
  )
end