mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
fix(cloudformation): forward Lambda environment variables during stack provisioning (#510)
This commit is contained in:
1 parent
114fade129
commit
8ac4cdcd94
2 files changed
+65
No files matched your search
+10
@@ -356,6 +356,16 @@ public class CloudFormationResourceProvisioner {
|
||||
req.put("Description", description);
|
||||
}
|
||||
|
||||
if (props != null && props.has("Environment")) {
|
||||
JsonNode envNode = engine.resolveNode(props.get("Environment"));
|
||||
if (envNode != null && envNode.has("Variables")) {
|
||||
JsonNode varsNode = envNode.get("Variables");
|
||||
Map<String, String> vars = new HashMap<>();
|
||||
varsNode.fields().forEachRemaining(e -> vars.put(e.getKey(), e.getValue().asText()));
|
||||
req.put("Environment", Map.of("Variables", vars));
|
||||
}
|
||||
}
|
||||
|
||||
io.github.hectorvent.floci.services.lambda.model.LambdaFunction func;
|
||||
try {
|
||||
func = lambdaService.createFunction(region, req);
|
||||
|
||||
Reference in new issue
Block a user