Just delving into the world of TypeScript and Pulumi/IaC. I'm trying to wrap my head around a code snippet where an array of key values is being created using an interface:
import * as cPulumi from "@company/pulumi";
interface TestInterface {
name: cPulumi.output<string>,
description: cPulumi.output<string>,
password: cPulumi.output<string>
}
const allVm = {
vm1: new Array<TestInterface>(),
vm2: new Array<TestInterface>(),
vm3: new Array<TestInterface>()
}
export { allVm }
Am I correct in understanding that this code is creating arrays for each "vm" with elements conforming to the TestInterface format? Later on, there seems to be code that inserts multiple objects following the structure of the interface into "vm1."