module AwsCftTools::Runbooks::Common::Changesets

Changesets - operations on changesets in the deploy runbook

Private Instance Methods

changeset_set() click to toggle source

@todo store this somewhere so we can have an “active” changeset to be reviewed and committed.

# File lib/aws_cft_tools/runbooks/common/changesets.rb, line 14
def changeset_set
  @changeset_set ||= SecureRandom.hex(16)
end
narrate_changes(changes) click to toggle source

provide a tabular report of changeset actions

# File lib/aws_cft_tools/runbooks/common/changesets.rb, line 21
def narrate_changes(changes)
  TablePrint::Config.io = $stdout
  tp(
    changes.map(&:to_narrative),
    %i[action logical_id physical_id type replacement scopes]
  )
end