RegionSslCertificateArgs

data class RegionSslCertificateArgs(val certificate: Output<String>? = null, val description: Output<String>? = null, val name: Output<String>? = null, val namePrefix: Output<String>? = null, val privateKey: Output<String>? = null, val project: Output<String>? = null, val region: Output<String>? = null) : ConvertibleToJava<RegionSslCertificateArgs>

A RegionSslCertificate resource, used for HTTPS load balancing. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user. To get more information about RegionSslCertificate, see:

Warning: All arguments including certificate and private_key will be stored in the raw state as plain-text.

Example Usage

Region Ssl Certificate Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RegionSslCertificate;
import com.pulumi.gcp.compute.RegionSslCertificateArgs;
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 RegionSslCertificate("default", RegionSslCertificateArgs.builder()
.region("us-central1")
.namePrefix("my-certificate-")
.description("a description")
.privateKey(Files.readString(Paths.get("path/to/private.key")))
.certificate(Files.readString(Paths.get("path/to/certificate.crt")))
.build());
}
}

Region Ssl Certificate Random Provider

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RegionSslCertificate;
import com.pulumi.gcp.compute.RegionSslCertificateArgs;
import com.pulumi.random.RandomId;
import com.pulumi.random.RandomIdArgs;
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 RegionSslCertificate("default", RegionSslCertificateArgs.builder()
.region("us-central1")
.privateKey(Files.readString(Paths.get("path/to/private.key")))
.certificate(Files.readString(Paths.get("path/to/certificate.crt")))
.build());
var certificate = new RandomId("certificate", RandomIdArgs.builder()
.byteLength(4)
.prefix("my-certificate-")
.keepers(Map.ofEntries(
Map.entry("private_key", computeFileBase64Sha256("path/to/private.key")),
Map.entry("certificate", computeFileBase64Sha256("path/to/certificate.crt"))
))
.build());
}
}

Region Ssl Certificate Target Https Proxies

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RegionSslCertificate;
import com.pulumi.gcp.compute.RegionSslCertificateArgs;
import com.pulumi.gcp.compute.RegionHealthCheck;
import com.pulumi.gcp.compute.RegionHealthCheckArgs;
import com.pulumi.gcp.compute.inputs.RegionHealthCheckHttpHealthCheckArgs;
import com.pulumi.gcp.compute.RegionBackendService;
import com.pulumi.gcp.compute.RegionBackendServiceArgs;
import com.pulumi.gcp.compute.RegionUrlMap;
import com.pulumi.gcp.compute.RegionUrlMapArgs;
import com.pulumi.gcp.compute.inputs.RegionUrlMapHostRuleArgs;
import com.pulumi.gcp.compute.inputs.RegionUrlMapPathMatcherArgs;
import com.pulumi.gcp.compute.RegionTargetHttpsProxy;
import com.pulumi.gcp.compute.RegionTargetHttpsProxyArgs;
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 defaultRegionSslCertificate = new RegionSslCertificate("defaultRegionSslCertificate", RegionSslCertificateArgs.builder()
.region("us-central1")
.namePrefix("my-certificate-")
.privateKey(Files.readString(Paths.get("path/to/private.key")))
.certificate(Files.readString(Paths.get("path/to/certificate.crt")))
.build());
var defaultRegionHealthCheck = new RegionHealthCheck("defaultRegionHealthCheck", RegionHealthCheckArgs.builder()
.region("us-central1")
.httpHealthCheck(RegionHealthCheckHttpHealthCheckArgs.builder()
.port(80)
.build())
.build());
var defaultRegionBackendService = new RegionBackendService("defaultRegionBackendService", RegionBackendServiceArgs.builder()
.region("us-central1")
.protocol("HTTP")
.loadBalancingScheme("INTERNAL_MANAGED")
.timeoutSec(10)
.healthChecks(defaultRegionHealthCheck.id())
.build());
var defaultRegionUrlMap = new RegionUrlMap("defaultRegionUrlMap", RegionUrlMapArgs.builder()
.region("us-central1")
.description("a description")
.defaultService(defaultRegionBackendService.id())
.hostRules(RegionUrlMapHostRuleArgs.builder()
.hosts("mysite.com")
.pathMatcher("allpaths")
.build())
.pathMatchers(RegionUrlMapPathMatcherArgs.builder()
.name("allpaths")
.defaultService(defaultRegionBackendService.id())
.pathRules(RegionUrlMapPathMatcherPathRuleArgs.builder()
.paths("/*")
.service(defaultRegionBackendService.id())
.build())
.build())
.build());
var defaultRegionTargetHttpsProxy = new RegionTargetHttpsProxy("defaultRegionTargetHttpsProxy", RegionTargetHttpsProxyArgs.builder()
.region("us-central1")
.urlMap(defaultRegionUrlMap.id())
.sslCertificates(defaultRegionSslCertificate.id())
.build());
}
}

Import

RegionSslCertificate can be imported using any of these accepted formats

$ pulumi import gcp:compute/regionSslCertificate:RegionSslCertificate default projects/{{project}}/regions/{{region}}/sslCertificates/{{name}}
$ pulumi import gcp:compute/regionSslCertificate:RegionSslCertificate default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/regionSslCertificate:RegionSslCertificate default {{region}}/{{name}}
$ pulumi import gcp:compute/regionSslCertificate:RegionSslCertificate default {{name}}

Constructors

Link copied to clipboard
constructor(certificate: Output<String>? = null, description: Output<String>? = null, name: Output<String>? = null, namePrefix: Output<String>? = null, privateKey: Output<String>? = null, project: Output<String>? = null, region: Output<String>? = null)

Properties

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

The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. Note: This property is sensitive and will not be displayed in the plan.

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

An optional description of this resource.

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

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. These are in the same namespace as the managed SSL certificates.

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

Creates a unique name beginning with the specified prefix. Conflicts with name.

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

The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.

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

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 region: Output<String>? = null

The Region in which the created regional ssl certificate should reside. If it is not provided, the provider region is used. */

Functions

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