Skip to content

Commit

Permalink
pass DnsDomain into sub component
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronwalker committed Mar 5, 2020
1 parent 8094269 commit f53b29f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion fargate-v2.cfhighlander.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
end

#Pass the all the config from the parent component to the inlined component
Component template: 'ecs-task@secrets', name: "#{component_name.gsub('-','').gsub('_','')}Task", render: Inline, config: @config
Component template: 'ecs-task@secrets', name: "#{component_name.gsub('-','').gsub('_','')}Task", render: Inline, config: @config do
parameter name: 'DnsDomain', value: Ref('DnsDomain')
end

end
4 changes: 2 additions & 2 deletions spec/simple_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

it 'has property Tags' do
expect(properties["Tags"]).to eq([
{"Key"=>"Name", "Value"=>"fargatev2"},
{"Key"=>"Name", "Value"=>"fargatev2Task"},
{"Key"=>"Environment", "Value"=>{"Ref"=>"EnvironmentName"}},
{"Key"=>"EnvironmentType", "Value"=>{"Ref"=>"EnvironmentType"}}])
end
Expand Down Expand Up @@ -196,7 +196,7 @@

it 'has component_name as part of the export' do
expect(outputs['EcsTaskArn']).to eq({
"Export"=>{"Name"=>{"Fn::Sub"=>"${EnvironmentName}-fargatev2-EcsTaskArn"}},
"Export"=>{"Name"=>{"Fn::Sub"=>"${EnvironmentName}-fargatev2Task-EcsTaskArn"}},
"Value"=>{"Ref"=>"Task"}
})
end
Expand Down

0 comments on commit f53b29f

Please sign in to comment.