Skip to content

Commit

Permalink
add check to see if attribute is set
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsiaw committed May 24, 2022
1 parent 8b6e78e commit 9a8bd51
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/barcelona/plugins/itamae_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ def on_container_instance_user_data(_instance, user_data)
def on_network_stack_template(_stack, template)
bastion_lc = template["BastionLaunchConfiguration"]
return template if bastion_lc.nil?
return template unless attributes['recipe_url'] =~ URI::regexp

user_data = InstanceUserData.load_or_initialize(bastion_lc["Properties"]["UserData"])

install_itamae(user_data)
apply_itamae_recipe(user_data, attributes['recipe_url'], 'barcelona_bastion')
bastion_lc["Properties"]["UserData"] = user_data.build
Expand Down

0 comments on commit 9a8bd51

Please sign in to comment.