Beispiel #1
0
 public MyStack()
 {
     var exampleVpc = new Aws.Ec2.Vpc("exampleVpc", new Aws.Ec2.VpcArgs
     {
         CidrBlock          = "10.0.0.0/16",
         EnableDnsHostnames = true,
         EnableDnsSupport   = true,
     });
     var examplePrivateDnsNamespace = new Aws.ServiceDiscovery.PrivateDnsNamespace("examplePrivateDnsNamespace", new Aws.ServiceDiscovery.PrivateDnsNamespaceArgs
     {
         Description = "example",
         Vpc         = exampleVpc.Id,
     });
     var exampleService = new Aws.ServiceDiscovery.Service("exampleService", new Aws.ServiceDiscovery.ServiceArgs
     {
         DnsConfig = new Aws.ServiceDiscovery.Inputs.ServiceDnsConfigArgs
         {
             DnsRecords =
             {
                 new Aws.ServiceDiscovery.Inputs.ServiceDnsConfigDnsRecordArgs
                 {
                     Ttl  = 10,
                     Type = "A",
                 },
             },
             NamespaceId   = examplePrivateDnsNamespace.Id,
             RoutingPolicy = "MULTIVALUE",
         },
         HealthCheckCustomConfig = new Aws.ServiceDiscovery.Inputs.ServiceHealthCheckCustomConfigArgs
         {
             FailureThreshold = 1,
         },
     });
 }
Beispiel #2
0
 public MyStack()
 {
     var exampleVpc = new Aws.Ec2.Vpc("exampleVpc", new Aws.Ec2.VpcArgs
     {
         CidrBlock = "10.0.0.0/16",
     });
     var examplePrivateDnsNamespace = new Aws.ServiceDiscovery.PrivateDnsNamespace("examplePrivateDnsNamespace", new Aws.ServiceDiscovery.PrivateDnsNamespaceArgs
     {
         Description = "example",
         Vpc         = exampleVpc.Id,
     });
 }