import * as pulumi from "@pulumi/pulumi"; /** * A composite health check resource specifies the health source resources and * the health destination resource to which the aggregated health result from * the health source resources is delivered. * * > **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. * See Provider Versions for more details on beta resources. * * To get more information about RegionCompositeHealthCheck, see: * * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/regionCompositeHealthChecks) * * How-to Guides * * [Health checks overview](https://cloud.google.com/load-balancing/docs/health-check-concepts) * * ## Example Usage * * ### Compute Region Composite Health Check Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const hap = new gcp.compute.RegionHealthAggregationPolicy("hap", { * name: "test-composite-health-check-hap", * description: "health aggregation policy for health source", * region: "us-central1", * }); * const defaultHealthCheck = new gcp.compute.HealthCheck("default", { * name: "test-composite-health-check-hc", * httpHealthCheck: { * port: 80, * }, * }); * const defaultRegionBackendService = new gcp.compute.RegionBackendService("default", { * name: "test-composite-health-check-bs", * region: "us-central1", * healthChecks: defaultHealthCheck.id, * loadBalancingScheme: "INTERNAL", * }); * const _default = new gcp.compute.RegionHealthSource("default", { * name: "test-composite-health-check-hs", * region: "us-central1", * sourceType: "BACKEND_SERVICE", * sources: defaultRegionBackendService.id, * healthAggregationPolicy: hap.id, * }); * const defaultNetwork = new gcp.compute.Network("default", { * name: "test-composite-health-check-net", * autoCreateSubnetworks: false, * }); * const defaultSubnetwork = new gcp.compute.Subnetwork("default", { * name: "test-composite-health-check-sub", * ipCidrRange: "10.2.0.0/16", * region: "us-central1", * network: defaultNetwork.id, * }); * const defaultForwardingRule = new gcp.compute.ForwardingRule("default", { * name: "test-composite-health-check-fr", * region: "us-central1", * loadBalancingScheme: "INTERNAL", * backendService: defaultRegionBackendService.id, * network: defaultNetwork.id, * subnetwork: defaultSubnetwork.id, * ipProtocol: "TCP", * allPorts: true, * }); * const exampleTestCompositeHealthCheck = new gcp.compute.RegionCompositeHealthCheck("example_test_composite_health_check", { * name: "test-composite-health-check", * description: "test regional composite health check resource", * region: "us-central1", * healthSources: [_default.id], * healthDestination: defaultForwardingRule.id, * }); * ``` * * ## Import * * RegionCompositeHealthCheck can be imported using any of these accepted formats: * * * `projects/{{project}}/regions/{{region}}/compositeHealthChecks/{{name}}` * * `{{project}}/{{region}}/{{name}}` * * `{{region}}/{{name}}` * * `{{name}}` * * When using the `pulumi import` command, RegionCompositeHealthCheck can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:compute/regionCompositeHealthCheck:RegionCompositeHealthCheck default projects/{{project}}/regions/{{region}}/compositeHealthChecks/{{name}} * $ pulumi import gcp:compute/regionCompositeHealthCheck:RegionCompositeHealthCheck default {{project}}/{{region}}/{{name}} * $ pulumi import gcp:compute/regionCompositeHealthCheck:RegionCompositeHealthCheck default {{region}}/{{name}} * $ pulumi import gcp:compute/regionCompositeHealthCheck:RegionCompositeHealthCheck default {{name}} * ``` */ export declare class RegionCompositeHealthCheck extends pulumi.CustomResource { /** * Get an existing RegionCompositeHealthCheck resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: RegionCompositeHealthCheckState, opts?: pulumi.CustomResourceOptions): RegionCompositeHealthCheck; /** * Returns true if the given object is an instance of RegionCompositeHealthCheck. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is RegionCompositeHealthCheck; /** * Creation timestamp in RFC3339 text format. */ readonly creationTimestamp: pulumi.Output; /** * An optional description of this resource. Provide this property when you * create the resource. */ readonly description: pulumi.Output; /** * Fingerprint of this resource. A hash of the contents stored in this object. * This field is used in optimistic locking. This field will be ignored when * inserting a `CompositeHealthCheck`. An up-to-date fingerprint * must be provided in order to patch the CompositeHealthCheck; Otherwise, * the request will fail with error `412 conditionNotMet`. To see * the latest fingerprint, make a `get()` request to retrieve the * CompositeHealthCheck. */ readonly fingerprint: pulumi.Output; /** * URL to the destination resource. Must be set. Must be a * ForwardingRule. The ForwardingRule must have * load balancing scheme INTERNAL or * INTERNAL_MANAGED and must be regional and in the same region * as the CompositeHealthCheck (cross-region deployment for * INTERNAL_MANAGED is not supported). Can be mutated. */ readonly healthDestination: pulumi.Output; /** * URLs to the HealthSource resources whose results are AND'ed. * I.e. he aggregated result is is HEALTHY only if all sources * are HEALTHY. Must have at least 1. Must not have more than 10. * Must be regional and in the same region as the * CompositeHealthCheck. Can be mutated. */ readonly healthSources: pulumi.Output; /** * Name of the resource. Provided by the client when the resource is created. * The name must be 1-63 characters long, and comply with RFC1035. * Specifically, the name must be 1-63 characters long and match the regular * expression `a-z?` which means the first * character must be a lowercase letter, and all following characters must * be a dash, lowercase letter, or digit, except the last character, which * cannot be a dash. */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * URL of the region where the composite health check resides. */ readonly region: pulumi.Output; /** * Server-defined URL with id for the resource. */ readonly selfLinkWithId: pulumi.Output; /** * Create a RegionCompositeHealthCheck resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RegionCompositeHealthCheckArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RegionCompositeHealthCheck resources. */ export interface RegionCompositeHealthCheckState { /** * Creation timestamp in RFC3339 text format. */ creationTimestamp?: pulumi.Input; /** * An optional description of this resource. Provide this property when you * create the resource. */ description?: pulumi.Input; /** * Fingerprint of this resource. A hash of the contents stored in this object. * This field is used in optimistic locking. This field will be ignored when * inserting a `CompositeHealthCheck`. An up-to-date fingerprint * must be provided in order to patch the CompositeHealthCheck; Otherwise, * the request will fail with error `412 conditionNotMet`. To see * the latest fingerprint, make a `get()` request to retrieve the * CompositeHealthCheck. */ fingerprint?: pulumi.Input; /** * URL to the destination resource. Must be set. Must be a * ForwardingRule. The ForwardingRule must have * load balancing scheme INTERNAL or * INTERNAL_MANAGED and must be regional and in the same region * as the CompositeHealthCheck (cross-region deployment for * INTERNAL_MANAGED is not supported). Can be mutated. */ healthDestination?: pulumi.Input; /** * URLs to the HealthSource resources whose results are AND'ed. * I.e. he aggregated result is is HEALTHY only if all sources * are HEALTHY. Must have at least 1. Must not have more than 10. * Must be regional and in the same region as the * CompositeHealthCheck. Can be mutated. */ healthSources?: pulumi.Input[]>; /** * Name of the resource. Provided by the client when the resource is created. * The name must be 1-63 characters long, and comply with RFC1035. * Specifically, the name must be 1-63 characters long and match the regular * expression `a-z?` which means the first * character must be a lowercase letter, and all following characters must * be a dash, lowercase letter, or digit, except the last character, which * cannot be a dash. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * URL of the region where the composite health check resides. */ region?: pulumi.Input; /** * Server-defined URL with id for the resource. */ selfLinkWithId?: pulumi.Input; } /** * The set of arguments for constructing a RegionCompositeHealthCheck resource. */ export interface RegionCompositeHealthCheckArgs { /** * An optional description of this resource. Provide this property when you * create the resource. */ description?: pulumi.Input; /** * URL to the destination resource. Must be set. Must be a * ForwardingRule. The ForwardingRule must have * load balancing scheme INTERNAL or * INTERNAL_MANAGED and must be regional and in the same region * as the CompositeHealthCheck (cross-region deployment for * INTERNAL_MANAGED is not supported). Can be mutated. */ healthDestination: pulumi.Input; /** * URLs to the HealthSource resources whose results are AND'ed. * I.e. he aggregated result is is HEALTHY only if all sources * are HEALTHY. Must have at least 1. Must not have more than 10. * Must be regional and in the same region as the * CompositeHealthCheck. Can be mutated. */ healthSources?: pulumi.Input[]>; /** * Name of the resource. Provided by the client when the resource is created. * The name must be 1-63 characters long, and comply with RFC1035. * Specifically, the name must be 1-63 characters long and match the regular * expression `a-z?` which means the first * character must be a lowercase letter, and all following characters must * be a dash, lowercase letter, or digit, except the last character, which * cannot be a dash. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * URL of the region where the composite health check resides. */ region: pulumi.Input; }