flat-ambulance-51692
06/21/2022, 9:33 PMusing System.Collections.Immutable;
using Pulumi;
using Pulumi.Awsx.Ec2.Inputs;
using Ec2 = Pulumi.Awsx.Ec2;
class MyStack : Stack
{
public MyStack()
{
var vpc = new Ec2.Vpc("custom", new Ec2.VpcArgs
{
SubnetSpecs =
{
new SubnetSpecArgs
{
Type = Ec2.SubnetType.Public,
CidrMask = 22,
},
new SubnetSpecArgs
{
Type = Ec2.SubnetType.Private,
CidrMask = 20,
}
}
});
this.VpcId = vpc.VpcId;
this.PublicSubnetIds = vpc.PublicSubnetIds;
this.PrivateSubnetIds = vpc.PrivateSubnetIds;
}
[Output] public Output<ImmutableArray<string>> PrivateSubnetIds { get; private set; }
[Output] public Output<ImmutableArray<string>> PublicSubnetIds { get; private set; }
[Output] public Output<string> VpcId { get; set; }
}
class Program
{
static Task<int> Main(string[] args) => Deployment.RunAsync<MyStack>();
}
However, having some issues resolving dependencies (see attached image). I've included the packages window so you can see the versions.
Judging by the using
statements this example code seems out of date?billowy-army-68599
06/21/2022, 11:22 PMPulumi.Aws
but not Pulumi.Awsx
installedotnet add package Pulumi.Awsx --version 1.0.0-beta.8
flat-ambulance-51692
06/22/2022, 8:00 AM