1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. SSLCertificate
Google Cloud Classic v7.11.0 published on Friday, Feb 23, 2024 by Pulumi

gcp.compute.SSLCertificate

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.11.0 published on Friday, Feb 23, 2024 by Pulumi

    An SslCertificate 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 SslCertificate, see:

    Example Usage

    Ssl Certificate Basic

    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Gcp.Compute.SSLCertificate("default", new()
        {
            NamePrefix = "my-certificate-",
            Description = "a description",
            PrivateKey = File.ReadAllText("path/to/private.key"),
            Certificate = File.ReadAllText("path/to/certificate.crt"),
        });
    
    });
    
    package main
    
    import (
    	"os"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewSSLCertificate(ctx, "default", &compute.SSLCertificateArgs{
    			NamePrefix:  pulumi.String("my-certificate-"),
    			Description: pulumi.String("a description"),
    			PrivateKey:  readFileOrPanic("path/to/private.key"),
    			Certificate: readFileOrPanic("path/to/certificate.crt"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.SSLCertificate;
    import com.pulumi.gcp.compute.SSLCertificateArgs;
    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 SSLCertificate("default", SSLCertificateArgs.builder()        
                .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());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.compute.SSLCertificate("default",
        name_prefix="my-certificate-",
        description="a description",
        private_key=(lambda path: open(path).read())("path/to/private.key"),
        certificate=(lambda path: open(path).read())("path/to/certificate.crt"))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as fs from "fs";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.compute.SSLCertificate("default", {
        namePrefix: "my-certificate-",
        description: "a description",
        privateKey: fs.readFileSync("path/to/private.key", "utf8"),
        certificate: fs.readFileSync("path/to/certificate.crt", "utf8"),
    });
    
    resources:
      default:
        type: gcp:compute:SSLCertificate
        properties:
          namePrefix: my-certificate-
          description: a description
          privateKey:
            fn::readFile: path/to/private.key
          certificate:
            fn::readFile: path/to/certificate.crt
    

    Ssl Certificate Random Provider

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Security.Cryptography;
    using System.Text;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Random = Pulumi.Random;
    
    	
    string ComputeFileBase64Sha256(string path) 
    {
        var fileData = Encoding.UTF8.GetBytes(File.ReadAllText(path));
        var hashData = SHA256.Create().ComputeHash(fileData);
        return Convert.ToBase64String(hashData);
    }
    
    return await Deployment.RunAsync(() => 
    {
        // You may also want to control name generation explicitly:
        var @default = new Gcp.Compute.SSLCertificate("default", new()
        {
            PrivateKey = File.ReadAllText("path/to/private.key"),
            Certificate = File.ReadAllText("path/to/certificate.crt"),
        });
    
        var certificate = new Random.RandomId("certificate", new()
        {
            ByteLength = 4,
            Prefix = "my-certificate-",
            Keepers = 
            {
                { "private_key", ComputeFileBase64Sha256("path/to/private.key") },
                { "certificate", ComputeFileBase64Sha256("path/to/certificate.crt") },
            },
        });
    
    });
    
    package main
    
    import (
    	"crypto/sha256"
    	"os"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func filebase64sha256OrPanic(path string) string {
    	if fileData, err := os.ReadFile(path); err == nil {
    		hashedData := sha256.Sum256([]byte(fileData))
    		return base64.StdEncoding.EncodeToString(hashedData[:])
    	} else {
    		panic(err.Error())
    	}
    }
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewSSLCertificate(ctx, "default", &compute.SSLCertificateArgs{
    			PrivateKey:  readFileOrPanic("path/to/private.key"),
    			Certificate: readFileOrPanic("path/to/certificate.crt"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = random.NewRandomId(ctx, "certificate", &random.RandomIdArgs{
    			ByteLength: pulumi.Int(4),
    			Prefix:     pulumi.String("my-certificate-"),
    			Keepers: pulumi.StringMap{
    				"private_key": filebase64sha256OrPanic("path/to/private.key"),
    				"certificate": filebase64sha256OrPanic("path/to/certificate.crt"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.SSLCertificate;
    import com.pulumi.gcp.compute.SSLCertificateArgs;
    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 SSLCertificate("default", SSLCertificateArgs.builder()        
                .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());
    
        }
    }
    
    import pulumi
    import base64
    import hashlib
    import pulumi_gcp as gcp
    import pulumi_random as random
    
    def computeFilebase64sha256(path):
    	fileData = open(path).read().encode()
    	hashedData = hashlib.sha256(fileData.encode()).digest()
    	return base64.b64encode(hashedData).decode()
    
    # You may also want to control name generation explicitly:
    default = gcp.compute.SSLCertificate("default",
        private_key=(lambda path: open(path).read())("path/to/private.key"),
        certificate=(lambda path: open(path).read())("path/to/certificate.crt"))
    certificate = random.RandomId("certificate",
        byte_length=4,
        prefix="my-certificate-",
        keepers={
            "private_key": computeFilebase64sha256("path/to/private.key"),
            "certificate": computeFilebase64sha256("path/to/certificate.crt"),
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as crypto from "crypto";
    import * as fs from "fs";
    import * as gcp from "@pulumi/gcp";
    import * as random from "@pulumi/random";
    
    function computeFilebase64sha256(path: string): string {
    	const fileData = Buffer.from(fs.readFileSync(path, 'binary'))
    	return crypto.createHash('sha256').update(fileData).digest('hex')
    }
    
    // You may also want to control name generation explicitly:
    const _default = new gcp.compute.SSLCertificate("default", {
        privateKey: fs.readFileSync("path/to/private.key", "utf8"),
        certificate: fs.readFileSync("path/to/certificate.crt", "utf8"),
    });
    const certificate = new random.RandomId("certificate", {
        byteLength: 4,
        prefix: "my-certificate-",
        keepers: {
            private_key: computeFilebase64sha256("path/to/private.key"),
            certificate: computeFilebase64sha256("path/to/certificate.crt"),
        },
    });
    

    Coming soon!

    Ssl Certificate Target Https Proxies

    Coming soon!

    Coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.SSLCertificate;
    import com.pulumi.gcp.compute.SSLCertificateArgs;
    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 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 defaultSSLCertificate = new SSLCertificate("defaultSSLCertificate", SSLCertificateArgs.builder()        
                .namePrefix("my-certificate-")
                .privateKey(Files.readString(Paths.get("path/to/private.key")))
                .certificate(Files.readString(Paths.get("path/to/certificate.crt")))
                .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("mysite.com")
                    .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(defaultSSLCertificate.id())
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      # Using with Target HTTPS Proxies
      # //
      # // SSL certificates cannot be updated after creation. In order to apply
      # // the specified configuration, the provider will destroy the existing
      # // resource and create a replacement. Example:
      defaultSSLCertificate:
        type: gcp:compute:SSLCertificate
        properties:
          namePrefix: my-certificate-
          privateKey:
            fn::readFile: path/to/private.key
          certificate:
            fn::readFile: path/to/certificate.crt
      defaultTargetHttpsProxy:
        type: gcp:compute:TargetHttpsProxy
        properties:
          urlMap: ${defaultURLMap.id}
          sslCertificates:
            - ${defaultSSLCertificate.id}
      defaultURLMap:
        type: gcp:compute:URLMap
        properties:
          description: a description
          defaultService: ${defaultBackendService.id}
          hostRules:
            - hosts:
                - mysite.com
              pathMatcher: allpaths
          pathMatchers:
            - name: allpaths
              defaultService: ${defaultBackendService.id}
              pathRules:
                - paths:
                    - /*
                  service: ${defaultBackendService.id}
      defaultBackendService:
        type: gcp:compute:BackendService
        properties:
          portName: http
          protocol: HTTP
          timeoutSec: 10
          healthChecks:
            - ${defaultHttpHealthCheck.id}
      defaultHttpHealthCheck:
        type: gcp:compute:HttpHealthCheck
        properties:
          requestPath: /
          checkIntervalSec: 1
          timeoutSec: 1
    

    Create SSLCertificate Resource

    new SSLCertificate(name: string, args: SSLCertificateArgs, opts?: CustomResourceOptions);
    @overload
    def SSLCertificate(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       certificate: Optional[str] = None,
                       description: Optional[str] = None,
                       name: Optional[str] = None,
                       name_prefix: Optional[str] = None,
                       private_key: Optional[str] = None,
                       project: Optional[str] = None)
    @overload
    def SSLCertificate(resource_name: str,
                       args: SSLCertificateArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewSSLCertificate(ctx *Context, name string, args SSLCertificateArgs, opts ...ResourceOption) (*SSLCertificate, error)
    public SSLCertificate(string name, SSLCertificateArgs args, CustomResourceOptions? opts = null)
    public SSLCertificate(String name, SSLCertificateArgs args)
    public SSLCertificate(String name, SSLCertificateArgs args, CustomResourceOptions options)
    
    type: gcp:compute:SSLCertificate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SSLCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SSLCertificateArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SSLCertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SSLCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SSLCertificateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SSLCertificate Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SSLCertificate resource accepts the following input properties:

    Certificate string
    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.
    PrivateKey string
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    Description string
    An optional description of this resource.
    Name string

    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.

    NamePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Certificate string
    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.
    PrivateKey string
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    Description string
    An optional description of this resource.
    Name string

    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.

    NamePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    certificate String
    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.
    privateKey String
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    description String
    An optional description of this resource.
    name String

    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.

    namePrefix String
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    certificate string
    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.
    privateKey string
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    description string
    An optional description of this resource.
    name string

    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.

    namePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    certificate str
    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.
    private_key str
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    description str
    An optional description of this resource.
    name str

    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.

    name_prefix str
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    certificate String
    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.
    privateKey String
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    description String
    An optional description of this resource.
    name String

    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.

    namePrefix String
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SSLCertificate resource produces the following output properties:

    CertificateId int
    The unique identifier for the resource.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    ExpireTime string
    Expire time of the certificate in RFC3339 text format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    CertificateId int
    The unique identifier for the resource.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    ExpireTime string
    Expire time of the certificate in RFC3339 text format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SelfLink string
    The URI of the created resource.
    certificateId Integer
    The unique identifier for the resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    expireTime String
    Expire time of the certificate in RFC3339 text format.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.
    certificateId number
    The unique identifier for the resource.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    expireTime string
    Expire time of the certificate in RFC3339 text format.
    id string
    The provider-assigned unique ID for this managed resource.
    selfLink string
    The URI of the created resource.
    certificate_id int
    The unique identifier for the resource.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    expire_time str
    Expire time of the certificate in RFC3339 text format.
    id str
    The provider-assigned unique ID for this managed resource.
    self_link str
    The URI of the created resource.
    certificateId Number
    The unique identifier for the resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    expireTime String
    Expire time of the certificate in RFC3339 text format.
    id String
    The provider-assigned unique ID for this managed resource.
    selfLink String
    The URI of the created resource.

    Look up Existing SSLCertificate Resource

    Get an existing SSLCertificate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SSLCertificateState, opts?: CustomResourceOptions): SSLCertificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            certificate: Optional[str] = None,
            certificate_id: Optional[int] = None,
            creation_timestamp: Optional[str] = None,
            description: Optional[str] = None,
            expire_time: Optional[str] = None,
            name: Optional[str] = None,
            name_prefix: Optional[str] = None,
            private_key: Optional[str] = None,
            project: Optional[str] = None,
            self_link: Optional[str] = None) -> SSLCertificate
    func GetSSLCertificate(ctx *Context, name string, id IDInput, state *SSLCertificateState, opts ...ResourceOption) (*SSLCertificate, error)
    public static SSLCertificate Get(string name, Input<string> id, SSLCertificateState? state, CustomResourceOptions? opts = null)
    public static SSLCertificate get(String name, Output<String> id, SSLCertificateState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Certificate string
    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.
    CertificateId int
    The unique identifier for the resource.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional description of this resource.
    ExpireTime string
    Expire time of the certificate in RFC3339 text format.
    Name string

    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.

    NamePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    PrivateKey string
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    SelfLink string
    The URI of the created resource.
    Certificate string
    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.
    CertificateId int
    The unique identifier for the resource.
    CreationTimestamp string
    Creation timestamp in RFC3339 text format.
    Description string
    An optional description of this resource.
    ExpireTime string
    Expire time of the certificate in RFC3339 text format.
    Name string

    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.

    NamePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    PrivateKey string
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    SelfLink string
    The URI of the created resource.
    certificate String
    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.
    certificateId Integer
    The unique identifier for the resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional description of this resource.
    expireTime String
    Expire time of the certificate in RFC3339 text format.
    name String

    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.

    namePrefix String
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    privateKey String
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    selfLink String
    The URI of the created resource.
    certificate string
    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.
    certificateId number
    The unique identifier for the resource.
    creationTimestamp string
    Creation timestamp in RFC3339 text format.
    description string
    An optional description of this resource.
    expireTime string
    Expire time of the certificate in RFC3339 text format.
    name string

    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.

    namePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    privateKey string
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    selfLink string
    The URI of the created resource.
    certificate str
    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.
    certificate_id int
    The unique identifier for the resource.
    creation_timestamp str
    Creation timestamp in RFC3339 text format.
    description str
    An optional description of this resource.
    expire_time str
    Expire time of the certificate in RFC3339 text format.
    name str

    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.

    name_prefix str
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    private_key str
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    self_link str
    The URI of the created resource.
    certificate String
    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.
    certificateId Number
    The unique identifier for the resource.
    creationTimestamp String
    Creation timestamp in RFC3339 text format.
    description String
    An optional description of this resource.
    expireTime String
    Expire time of the certificate in RFC3339 text format.
    name String

    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.

    namePrefix String
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    privateKey String
    The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.


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

    Import

    SslCertificate can be imported using any of these accepted formats:

    • projects/{{project}}/global/sslCertificates/{{name}}

    • {{project}}/{{name}}

    • {{name}}

    When using the pulumi import command, SslCertificate can be imported using one of the formats above. For example:

    $ pulumi import gcp:compute/sSLCertificate:SSLCertificate default projects/{{project}}/global/sslCertificates/{{name}}
    
    $ pulumi import gcp:compute/sSLCertificate:SSLCertificate default {{project}}/{{name}}
    
    $ pulumi import gcp:compute/sSLCertificate:SSLCertificate default {{name}}
    

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.11.0 published on Friday, Feb 23, 2024 by Pulumi