Пример #1
0
 public MyStack()
 {
     var mainVpc = new Aws.Ec2.Vpc("mainVpc", new Aws.Ec2.VpcArgs
     {
         CidrBlock = "10.0.0.0/16",
     });
     var private_a = new Aws.Ec2.Subnet("private-a", new Aws.Ec2.SubnetArgs
     {
         AvailabilityZone = "us-east-1a",
         CidrBlock        = "10.0.0.0/24",
         VpcId            = mainVpc.Id,
     });
     var private_b = new Aws.Ec2.Subnet("private-b", new Aws.Ec2.SubnetArgs
     {
         AvailabilityZone = "us-east-1b",
         CidrBlock        = "10.0.1.0/24",
         VpcId            = mainVpc.Id,
     });
     var mainDirectory = new Aws.DirectoryService.Directory("mainDirectory", new Aws.DirectoryService.DirectoryArgs
     {
         Password    = "******",
         Size        = "Small",
         VpcSettings = new Aws.DirectoryService.Inputs.DirectoryVpcSettingsArgs
         {
             SubnetIds =
             {
                 private_a.Id,
                 private_b.Id,
             },
             VpcId = mainVpc.Id,
         },
     });
     var mainWorkspaces_directoryDirectory = new Aws.Workspaces.Directory("mainWorkspaces/directoryDirectory", new Aws.Workspaces.DirectoryArgs
     {
         DirectoryId            = mainDirectory.Id,
         SelfServicePermissions = new Aws.Workspaces.Inputs.DirectorySelfServicePermissionsArgs
         {
             IncreaseVolumeSize = true,
             RebuildWorkspace   = true,
         },
     });
 }
Пример #2
0
 public MyStack()
 {
     var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
     {
         CidrBlock = "10.0.0.0/16",
     });
     var foo = new Aws.Ec2.Subnet("foo", new Aws.Ec2.SubnetArgs
     {
         AvailabilityZone = "us-west-2a",
         CidrBlock        = "10.0.1.0/24",
         VpcId            = main.Id,
     });
     var bar = new Aws.Ec2.Subnet("bar", new Aws.Ec2.SubnetArgs
     {
         AvailabilityZone = "us-west-2b",
         CidrBlock        = "10.0.2.0/24",
         VpcId            = main.Id,
     });
     var connector = new Aws.DirectoryService.Directory("connector", new Aws.DirectoryService.DirectoryArgs
     {
         ConnectSettings = new Aws.DirectoryService.Inputs.DirectoryConnectSettingsArgs
         {
             CustomerDnsIps =
             {
                 "A.B.C.D",
             },
             CustomerUsername = "******",
             SubnetIds        =
             {
                 foo.Id,
                 bar.Id,
             },
             VpcId = main.Id,
         },
         Password = "******",
         Size     = "Small",
         Type     = "ADConnector",
     });
 }
Пример #3
0
 public MyStack()
 {
     var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
     {
         CidrBlock = "10.0.0.0/16",
     });
     var foo = new Aws.Ec2.Subnet("foo", new Aws.Ec2.SubnetArgs
     {
         AvailabilityZone = "us-west-2a",
         CidrBlock        = "10.0.1.0/24",
         VpcId            = main.Id,
     });
     var barSubnet = new Aws.Ec2.Subnet("barSubnet", new Aws.Ec2.SubnetArgs
     {
         AvailabilityZone = "us-west-2b",
         CidrBlock        = "10.0.2.0/24",
         VpcId            = main.Id,
     });
     var barDirectory = new Aws.DirectoryService.Directory("barDirectory", new Aws.DirectoryService.DirectoryArgs
     {
         Edition  = "Standard",
         Password = "******",
         Tags     =
         {
             { "Project", "foo" },
         },
         Type        = "MicrosoftAD",
         VpcSettings = new Aws.DirectoryService.Inputs.DirectoryVpcSettingsArgs
         {
             SubnetIds =
             {
                 foo.Id,
                 barSubnet.Id,
             },
             VpcId = main.Id,
         },
     });
 }