Method: Jets::Stack::Resource#replace_placeholers
- Defined in:
- lib/jets/stack/resource.rb
#replace_placeholers(template) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/jets/stack/resource.rb', line 20 def replace_placeholers(template) attributes = template.values.first s3_key = attributes.dig('Properties','Code','S3Key') if s3_key == "code_s3_key_placeholder" checksum = Jets::Builders::Md5.checksums["stage/code"] code_zip = "code-#{checksum}.zip" attributes['Properties']['Code']['S3Key'] = "jets/code/#{code_zip}" end template end |