Skip to content

Instantly share code, notes, and snippets.

@aibou
Created February 21, 2019 06:28
Show Gist options
  • Save aibou/1898127981862ea61f965b708d2fb396 to your computer and use it in GitHub Desktop.
Save aibou/1898127981862ea61f965b708d2fb396 to your computer and use it in GitHub Desktop.
Infrastructure as Code by Rubyのために、なんかこういうテンプレートエンジンほしいよね
params = {
task_definition_arn: "",
task_count: 1
}
XXX.new(<<~EOS).render
ecs_parameters do
task_definition_arn #{params[:task_definition_arn].inspect}
task_count #{params[:task_count]} %% unless params[:task_count].nil?
platform_version #{params[:platform_version]} %% unless params[:platform_version].nil?
end
EOS
# ---------------
ecs_parameters do
task_definition_arn ""
task_count 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment