EndpointPolicy

class EndpointPolicy : KotlinCustomResource

Example Usage

Network Services Endpoint Policy Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.EndpointPolicy;
import com.pulumi.gcp.networkservices.EndpointPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.EndpointPolicyTrafficPortSelectorArgs;
import com.pulumi.gcp.networkservices.inputs.EndpointPolicyEndpointMatcherArgs;
import com.pulumi.gcp.networkservices.inputs.EndpointPolicyEndpointMatcherMetadataLabelMatcherArgs;
import com.pulumi.resources.CustomResourceOptions;
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 default_ = new EndpointPolicy("default", EndpointPolicyArgs.builder()
.labels(Map.of("foo", "bar"))
.description("my description")
.type("SIDECAR_PROXY")
.trafficPortSelector(EndpointPolicyTrafficPortSelectorArgs.builder()
.ports("8081")
.build())
.endpointMatcher(EndpointPolicyEndpointMatcherArgs.builder()
.metadataLabelMatcher(EndpointPolicyEndpointMatcherMetadataLabelMatcherArgs.builder()
.metadataLabelMatchCriteria("MATCH_ANY")
.metadataLabels(EndpointPolicyEndpointMatcherMetadataLabelMatcherMetadataLabelArgs.builder()
.labelName("foo")
.labelValue("bar")
.build())
.build())
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}

Network Services Endpoint Policy Empty Match

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.EndpointPolicy;
import com.pulumi.gcp.networkservices.EndpointPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.EndpointPolicyTrafficPortSelectorArgs;
import com.pulumi.gcp.networkservices.inputs.EndpointPolicyEndpointMatcherArgs;
import com.pulumi.gcp.networkservices.inputs.EndpointPolicyEndpointMatcherMetadataLabelMatcherArgs;
import com.pulumi.resources.CustomResourceOptions;
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 default_ = new EndpointPolicy("default", EndpointPolicyArgs.builder()
.labels(Map.of("foo", "bar"))
.description("my description")
.type("SIDECAR_PROXY")
.trafficPortSelector(EndpointPolicyTrafficPortSelectorArgs.builder()
.ports("8081")
.build())
.endpointMatcher(EndpointPolicyEndpointMatcherArgs.builder()
.metadataLabelMatcher(EndpointPolicyEndpointMatcherMetadataLabelMatcherArgs.builder()
.metadataLabelMatchCriteria("MATCH_ANY")
.build())
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}

Import

EndpointPolicy can be imported using any of these accepted formats

$ pulumi import gcp:networkservices/endpointPolicy:EndpointPolicy default projects/{{project}}/locations/global/endpointPolicies/{{name}}
$ pulumi import gcp:networkservices/endpointPolicy:EndpointPolicy default {{project}}/{{name}}
$ pulumi import gcp:networkservices/endpointPolicy:EndpointPolicy default {{name}}

Properties

Link copied to clipboard

This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints.

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

A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints.

Link copied to clipboard
val createTime: Output<String>

Time the TcpRoute was created in UTC.

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

A free-text description of the resource. Max length 1024 characters.

Link copied to clipboard

Required. A matcher that selects endpoints to which the policies should be applied. Structure is documented below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<Map<String, String>>?

Set of label tags associated with the TcpRoute resource.

Link copied to clipboard
val name: Output<String>

Name of the EndpointPolicy resource.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val serverTlsPolicy: Output<String>?

A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends.

Link copied to clipboard

Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports. Structure is documented below.

Link copied to clipboard
val type: Output<String>

The type of endpoint policy. This is primarily used to validate the configuration. Possible values are: SIDECAR_PROXY, GRPC_SERVER.

Link copied to clipboard
val updateTime: Output<String>

Time the TcpRoute was updated in UTC.

Link copied to clipboard
val urn: Output<String>