sparse-intern-71089
08/21/2020, 8:21 PMgreen-school-95910
08/21/2020, 8:22 PMgreen-school-95910
08/21/2020, 8:22 PMgreen-school-95910
08/21/2020, 8:24 PMbitter-dentist-28132
08/21/2020, 8:56 PMgreen-school-95910
08/21/2020, 8:59 PMSingleton
creates a resource only when it is actually used, and only once. The service shows how to do that for on demand thingsgreen-school-95910
08/21/2020, 9:00 PMgreen-school-95910
08/21/2020, 9:02 PMprojectService
function
and on your code, suppose you name it `myInfra`:
const infra = myInfra('customer1');
// Uses
infra.vpc
infra.cluster
...
And wherever you call myInfra('customer1')
you will use the same infragreen-school-95910
08/21/2020, 9:02 PMgreen-school-95910
08/21/2020, 9:03 PMmyInfra('customer1')
are removed, the resource is also removedgreen-school-95910
08/21/2020, 9:04 PMbitter-dentist-28132
09/03/2020, 12:42 AMgreen-school-95910
09/03/2020, 1:17 AMgreen-school-95910
09/03/2020, 1:18 AMgreen-school-95910
09/03/2020, 1:19 AMmyInfra('customer1')
could build a resource or get one, no difference. It would work the exact same waybitter-dentist-28132
09/03/2020, 3:51 AM