File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,6 +139,11 @@ func main() {
139139 Usage : "Lambda Environment variables" ,
140140 EnvVar : "PLUGIN_ENVIRONMENT,ENVIRONMENT,INPUT_ENVIRONMENT" ,
141141 },
142+ cli.StringSliceFlag {
143+ Name : "layers" ,
144+ Usage : "A list of function layers" ,
145+ EnvVar : "PLUGIN_LAYERS,LAYERS,INPUT_LAYERS" ,
146+ },
142147 cli.StringFlag {
143148 Name : "commit.sha" ,
144149 Usage : "git commit sha" ,
@@ -199,6 +204,7 @@ func run(c *cli.Context) error {
199204 Role : c .String ("role" ),
200205 Runtime : c .String ("runtime" ),
201206 Environment : c .StringSlice ("environment" ),
207+ Layers : c .StringSlice ("layers" ),
202208 ImageURI : c .String ("image-uri" ),
203209 Subnets : c .StringSlice ("subnets" ),
204210 SecurityGroups : c .StringSlice ("securitygroups" ),
Original file line number Diff line number Diff line change 4343 Subnets []string
4444 SecurityGroups []string
4545 Description string
46+ Layers []string
4647 }
4748
4849 // Commit information.
@@ -191,6 +192,14 @@ func (p Plugin) Exec() error {
191192 isUpdateConfig = true
192193 cfg .SetDescription (p .Config .Description )
193194 }
195+ if len (p .Config .Layers ) > 0 {
196+ isUpdateConfig = true
197+ var layers []* string
198+ for _ , v := range p .Config .Layers {
199+ layers = append (layers , aws .String (v ))
200+ }
201+ cfg .SetLayers (layers )
202+ }
194203
195204 envs := trimValues (p .Config .Environment )
196205 if len (envs ) > 0 {
You can’t perform that action at this time.
0 commit comments