VirtualRouterArgs

data class VirtualRouterArgs(val meshName: Output<String>? = null, val meshOwner: Output<String>? = null, val name: Output<String>? = null, val spec: Output<VirtualRouterSpecArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<VirtualRouterArgs>

Provides an AWS App Mesh virtual router resource.

Breaking Changes

Because of backward incompatible API changes (read here and here), aws.appmesh.VirtualRouter resource definitions created with provider versions earlier than v2.3.0 will need to be modified:

  • Remove service service_names from the spec argument. AWS has created a aws.appmesh.VirtualService resource for each of service names. These resource can be imported using import.

  • Add a listener configuration block to the spec argument. The state associated with existing resources will automatically be migrated.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appmesh.VirtualRouter;
import com.pulumi.aws.appmesh.VirtualRouterArgs;
import com.pulumi.aws.appmesh.inputs.VirtualRouterSpecArgs;
import com.pulumi.aws.appmesh.inputs.VirtualRouterSpecListenerArgs;
import com.pulumi.aws.appmesh.inputs.VirtualRouterSpecListenerPortMappingArgs;
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 serviceb = new VirtualRouter("serviceb", VirtualRouterArgs.builder()
.meshName(aws_appmesh_mesh.simple().id())
.spec(VirtualRouterSpecArgs.builder()
.listener(VirtualRouterSpecListenerArgs.builder()
.portMapping(VirtualRouterSpecListenerPortMappingArgs.builder()
.port(8080)
.protocol("http")
.build())
.build())
.build())
.build());
}
}

Import

App Mesh virtual routers can be imported using mesh_name together with the virtual router's name, e.g.,

$ pulumi import aws:appmesh/virtualRouter:VirtualRouter serviceb simpleapp/serviceB

Constructors

Link copied to clipboard
constructor(meshName: Output<String>? = null, meshOwner: Output<String>? = null, name: Output<String>? = null, spec: Output<VirtualRouterSpecArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val meshName: Output<String>? = null

Name of the service mesh in which to create the virtual router. Must be between 1 and 255 characters in length.

Link copied to clipboard
val meshOwner: Output<String>? = null

AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.

Link copied to clipboard
val name: Output<String>? = null

Name to use for the virtual router. Must be between 1 and 255 characters in length.

Link copied to clipboard
val spec: Output<VirtualRouterSpecArgs>? = null

Virtual router specification to apply.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): VirtualRouterArgs