Service
Provides a Service Discovery Service resource.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.servicediscovery.PrivateDnsNamespace;
import com.pulumi.aws.servicediscovery.PrivateDnsNamespaceArgs;
import com.pulumi.aws.servicediscovery.Service;
import com.pulumi.aws.servicediscovery.ServiceArgs;
import com.pulumi.aws.servicediscovery.inputs.ServiceDnsConfigArgs;
import com.pulumi.aws.servicediscovery.inputs.ServiceHealthCheckCustomConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.enableDnsSupport(true)
.enableDnsHostnames(true)
.build());
var examplePrivateDnsNamespace = new PrivateDnsNamespace("examplePrivateDnsNamespace", PrivateDnsNamespaceArgs.builder()
.description("example")
.vpc(exampleVpc.id())
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.dnsConfig(ServiceDnsConfigArgs.builder()
.namespaceId(examplePrivateDnsNamespace.id())
.dnsRecords(ServiceDnsConfigDnsRecordArgs.builder()
.ttl(10)
.type("A")
.build())
.routingPolicy("MULTIVALUE")
.build())
.healthCheckCustomConfig(ServiceHealthCheckCustomConfigArgs.builder()
.failureThreshold(1)
.build())
.build());
}
}
Content copied to clipboard
Import
Service Discovery Service can be imported using the service ID, e.g.,
$ pulumi import aws:servicediscovery/service:Service example 0123456789
Content copied to clipboard
Properties
Link copied to clipboard
The description of the service.
Link copied to clipboard
A complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance.
Link copied to clipboard
A boolean that indicates all instances should be deleted from the service so that the service can be destroyed without error. These instances are not recoverable.
Link copied to clipboard
A complex type that contains settings for an optional health check. Only for Public DNS namespaces.
Link copied to clipboard
A complex type that contains settings for ECS managed health checks.
Link copied to clipboard
The ID of the namespace that you want to use to create the service.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard