Skip to content

Commit

Permalink
Export service name (#40)
Browse files Browse the repository at this point in the history
* Fix for having multiple links

* Fix array insertion

* Insert was invalid, push instead:

* Add test

* Various refactoring & fixes around passing in arrays to taskdef parameters

* Add export for servicename

* Move output to end of file
  • Loading branch information
lohgannash authored and Guslington committed Nov 19, 2019
1 parent 7f21f09 commit e99f3fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ecs-service.cfndsl.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
CloudFormation do

export = defined?(export_name) ? export_name : component_name

awsvpc_enabled = false
if defined?(network_mode) && network_mode == 'awsvpc'
awsvpc_enabled = true
Expand Down Expand Up @@ -555,4 +557,9 @@

end

Output("ServiceName") {
Value(FnGetAtt(:Service, :Name))
Export FnSub("${EnvironmentName}-#{export}-ServiceName")
}

end

0 comments on commit e99f3fd

Please sign in to comment.