ManagedSslCertificateArgs

data class ManagedSslCertificateArgs(val certificateId: Output<Int>? = null, val description: Output<String>? = null, val managed: Output<ManagedSslCertificateManagedArgs>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<ManagedSslCertificateArgs>

An SslCertificate resource, used for HTTPS load balancing. This resource represents a certificate for which the certificate secrets are created and managed by Google. For a resource where you provide the key, see the SSL Certificate resource. To get more information about ManagedSslCertificate, see:

Warning: This resource should be used with extreme caution! Provisioning an SSL certificate is complex. Ensure that you understand the lifecycle of a certificate before attempting complex tasks like cert rotation automatically. This resource will "return" as soon as the certificate object is created, but post-creation the certificate object will go through a "provisioning" process. The provisioning process can complete only when the domain name for which the certificate is created points to a target pool which, itself, points at the certificate. Depending on your DNS provider, this may take some time, and migrating from self-managed certificates to Google-managed certificates may entail some downtime while the certificate provisions. In conclusion: Be extremely cautious.

Example Usage

Managed Ssl Certificate Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ManagedSslCertificate;
import com.pulumi.gcp.compute.ManagedSslCertificateArgs;
import com.pulumi.gcp.compute.inputs.ManagedSslCertificateManagedArgs;
import com.pulumi.gcp.compute.HttpHealthCheck;
import com.pulumi.gcp.compute.HttpHealthCheckArgs;
import com.pulumi.gcp.compute.BackendService;
import com.pulumi.gcp.compute.BackendServiceArgs;
import com.pulumi.gcp.compute.URLMap;
import com.pulumi.gcp.compute.URLMapArgs;
import com.pulumi.gcp.compute.inputs.URLMapHostRuleArgs;
import com.pulumi.gcp.compute.inputs.URLMapPathMatcherArgs;
import com.pulumi.gcp.compute.TargetHttpsProxy;
import com.pulumi.gcp.compute.TargetHttpsProxyArgs;
import com.pulumi.gcp.compute.GlobalForwardingRule;
import com.pulumi.gcp.compute.GlobalForwardingRuleArgs;
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 defaultManagedSslCertificate = new ManagedSslCertificate("defaultManagedSslCertificate", ManagedSslCertificateArgs.builder()
.managed(ManagedSslCertificateManagedArgs.builder()
.domains("sslcert.tf-test.club.")
.build())
.build());
var defaultHttpHealthCheck = new HttpHealthCheck("defaultHttpHealthCheck", HttpHealthCheckArgs.builder()
.requestPath("/")
.checkIntervalSec(1)
.timeoutSec(1)
.build());
var defaultBackendService = new BackendService("defaultBackendService", BackendServiceArgs.builder()
.portName("http")
.protocol("HTTP")
.timeoutSec(10)
.healthChecks(defaultHttpHealthCheck.id())
.build());
var defaultURLMap = new URLMap("defaultURLMap", URLMapArgs.builder()
.description("a description")
.defaultService(defaultBackendService.id())
.hostRules(URLMapHostRuleArgs.builder()
.hosts("sslcert.tf-test.club")
.pathMatcher("allpaths")
.build())
.pathMatchers(URLMapPathMatcherArgs.builder()
.name("allpaths")
.defaultService(defaultBackendService.id())
.pathRules(URLMapPathMatcherPathRuleArgs.builder()
.paths("/*")
.service(defaultBackendService.id())
.build())
.build())
.build());
var defaultTargetHttpsProxy = new TargetHttpsProxy("defaultTargetHttpsProxy", TargetHttpsProxyArgs.builder()
.urlMap(defaultURLMap.id())
.sslCertificates(defaultManagedSslCertificate.id())
.build());
var defaultGlobalForwardingRule = new GlobalForwardingRule("defaultGlobalForwardingRule", GlobalForwardingRuleArgs.builder()
.target(defaultTargetHttpsProxy.id())
.portRange(443)
.build());
}
}

Import

ManagedSslCertificate can be imported using any of these accepted formats

$ pulumi import gcp:compute/managedSslCertificate:ManagedSslCertificate default projects/{{project}}/global/sslCertificates/{{name}}
$ pulumi import gcp:compute/managedSslCertificate:ManagedSslCertificate default {{project}}/{{name}}
$ pulumi import gcp:compute/managedSslCertificate:ManagedSslCertificate default {{name}}

Constructors

Link copied to clipboard
constructor(certificateId: Output<Int>? = null, description: Output<String>? = null, managed: Output<ManagedSslCertificateManagedArgs>? = null, name: Output<String>? = null, project: Output<String>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard
val certificateId: Output<Int>? = null

The unique identifier for the resource.

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

An optional description of this resource.

Link copied to clipboard

Properties relevant to a managed certificate. These will be used if the certificate is managed (as indicated by a value of MANAGED in type). Structure is documented below.

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

Enum field whose value is always MANAGED - used to signal to the API which type this is. Default value is MANAGED. Possible values are: MANAGED. */

Functions

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