Cloud Pokročilý
Pulumi — IaC v reálném jazyce¶
PulumiIaCTypeScriptPython 5 min čtení
Pulumi s TypeScript/Python, component resources, stacks a testing.
Proč Pulumi¶
- Reálné jazyky — TS, Python, Go, C#
- IDE podpora — autocomplete, type checking
- Nativní loops, conditions, functions
- Unit testy s existujícími frameworky
Component Resource¶
export class Vpc extends pulumi.ComponentResource {
public readonly vpcId: pulumi.Output<string>;
constructor(name: string, args: VpcArgs, opts?) {
super("custom:network:Vpc", name, {}, opts);
const vpc = new aws.ec2.Vpc(`${name}-vpc`, {
cidrBlock: args.cidrBlock,
enableDnsHostnames: true,
}, { parent: this });
this.vpcId = vpc.id;
}
}
Testing¶
Unit testy s pytest/jest — mock resources, ověření outputs. Silné typování = méně runtime chyb.
Shrnutí¶
Pulumi = IaC v jazyku, který znáte. Type safety + testovatelnost = hlavní výhody.
Potřebujete pomoct s implementací?¶
Náš tým má zkušenosti s návrhem a implementací moderních architektur. Rádi vám pomůžeme.