github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/output-funcs-aws-pp/dotnet/output-funcs-aws.cs (about)

     1  using System.Collections.Generic;
     2  using Pulumi;
     3  using Aws = Pulumi.Aws;
     4  
     5  return await Deployment.RunAsync(() => 
     6  {
     7      var aws_vpc = new Aws.Ec2.Vpc("aws_vpc", new()
     8      {
     9          CidrBlock = "10.0.0.0/16",
    10          InstanceTenancy = "default",
    11      });
    12  
    13      var privateS3VpcEndpoint = new Aws.Ec2.VpcEndpoint("privateS3VpcEndpoint", new()
    14      {
    15          VpcId = aws_vpc.Id,
    16          ServiceName = "com.amazonaws.us-west-2.s3",
    17      });
    18  
    19      var privateS3PrefixList = Aws.Ec2.GetPrefixList.Invoke(new()
    20      {
    21          PrefixListId = privateS3VpcEndpoint.PrefixListId,
    22      });
    23  
    24      var bar = new Aws.Ec2.NetworkAcl("bar", new()
    25      {
    26          VpcId = aws_vpc.Id,
    27      });
    28  
    29      var privateS3NetworkAclRule = new Aws.Ec2.NetworkAclRule("privateS3NetworkAclRule", new()
    30      {
    31          NetworkAclId = bar.Id,
    32          RuleNumber = 200,
    33          Egress = false,
    34          Protocol = "tcp",
    35          RuleAction = "allow",
    36          CidrBlock = privateS3PrefixList.Apply(getPrefixListResult => getPrefixListResult.CidrBlocks[0]),
    37          FromPort = 443,
    38          ToPort = 443,
    39      });
    40  
    41      var amis = Aws.Ec2.GetAmiIds.Invoke(new()
    42      {
    43          Owners = new[]
    44          {
    45              bar.Id,
    46          },
    47          Filters = new[]
    48          {
    49              new Aws.Ec2.Inputs.GetAmiIdsFilterInputArgs
    50              {
    51                  Name = bar.Id,
    52                  Values = new[]
    53                  {
    54                      "pulumi*",
    55                  },
    56              },
    57          },
    58      });
    59  
    60  });
    61