Service

class Service : KotlinCustomResource

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());
}
}

Import

Service Discovery Service can be imported using the service ID, e.g.,

$ pulumi import aws:servicediscovery/service:Service example 0123456789

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the service.

Link copied to clipboard
val description: Output<String>?

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
val forceDestroy: Output<Boolean>?

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
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the service.

Link copied to clipboard
val namespaceId: Output<String>

The ID of the namespace that you want to use to create the service.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the service. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val type: Output<String>

If present, specifies that the service instances are only discoverable using the DiscoverInstances API operation. No DNS records is registered for the service instances. The only valid value is HTTP.

Link copied to clipboard
val urn: Output<String>