alicloud.slb.CaCertificate
A Load Balancer CA Certificate is used by the listener of the protocol https.
For information about slb and how to use it, see What is Server Load Balancer.
For information about CA Certificate and how to use it, see Configure CA Certificate.
Example Usage
using CA certificate content
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// create a CA certificate
var foo = new AliCloud.Slb.CaCertificate("foo", new()
{
Certificate = @"-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJnI******90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
",
CaCertificateName = "tf-testAccSlbCACertificate",
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := slb.NewCaCertificate(ctx, "foo", &slb.CaCertificateArgs{
CaCertificate: pulumi.String(fmt.Sprintf("-----BEGIN CERTIFICATE-----\nMIIDRjCCAq+gAwIBAgIJAJnI******90EAxEG/bJJyOm5LqoiA=\n-----END CERTIFICATE-----\n")),
CaCertificateName: pulumi.String("tf-testAccSlbCACertificate"),
})
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.alicloud.slb.CaCertificate;
import com.pulumi.alicloud.slb.CaCertificateArgs;
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 foo = new CaCertificate("foo", CaCertificateArgs.builder()
.caCertificate("""
-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJnI******90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
""")
.caCertificateName("tf-testAccSlbCACertificate")
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
# create a CA certificate
foo = alicloud.slb.CaCertificate("foo",
ca_certificate="""-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJnI******90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
""",
ca_certificate_name="tf-testAccSlbCACertificate")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// create a CA certificate
const foo = new alicloud.slb.CaCertificate("foo", {
caCertificate: `-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJnI******90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
`,
caCertificateName: "tf-testAccSlbCACertificate",
});
resources:
# create a CA certificate
foo:
type: alicloud:slb:CaCertificate
properties:
caCertificate: |
-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJnI******90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
caCertificateName: tf-testAccSlbCACertificate
using CA certificate file
using System.Collections.Generic;
using System.IO;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var foo_file = new AliCloud.Slb.CaCertificate("foo-file", new()
{
CaCertificateName = "tf-testAccSlbCACertificate",
Certificate = File.ReadAllText($"{path.Module}/ca_certificate.pem"),
});
});
package main
import (
"fmt"
"os"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
"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 := slb.NewCaCertificate(ctx, "foo-file", &slb.CaCertificateArgs{
CaCertificateName: pulumi.String("tf-testAccSlbCACertificate"),
CaCertificate: readFileOrPanic(fmt.Sprintf("%v/ca_certificate.pem", path.Module)),
})
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.alicloud.slb.CaCertificate;
import com.pulumi.alicloud.slb.CaCertificateArgs;
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 foo_file = new CaCertificate("foo-file", CaCertificateArgs.builder()
.caCertificateName("tf-testAccSlbCACertificate")
.caCertificate(Files.readString(Paths.get(String.format("%s/ca_certificate.pem", path.module()))))
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
foo_file = alicloud.slb.CaCertificate("foo-file",
ca_certificate_name="tf-testAccSlbCACertificate",
ca_certificate=(lambda path: open(path).read())(f"{path['module']}/ca_certificate.pem"))
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as fs from "fs";
const foo_file = new alicloud.slb.CaCertificate("foo-file", {
caCertificateName: "tf-testAccSlbCACertificate",
caCertificate: fs.readFileSync(`${path.module}/ca_certificate.pem`),
});
resources:
foo-file:
type: alicloud:slb:CaCertificate
properties:
caCertificateName: tf-testAccSlbCACertificate
caCertificate:
fn::readFile: ${path.module}/ca_certificate.pem
Create CaCertificate Resource
new CaCertificate(name: string, args: CaCertificateArgs, opts?: CustomResourceOptions);
@overload
def CaCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
ca_certificate: Optional[str] = None,
ca_certificate_name: Optional[str] = None,
name: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None)
@overload
def CaCertificate(resource_name: str,
args: CaCertificateArgs,
opts: Optional[ResourceOptions] = None)
func NewCaCertificate(ctx *Context, name string, args CaCertificateArgs, opts ...ResourceOption) (*CaCertificate, error)
public CaCertificate(string name, CaCertificateArgs args, CustomResourceOptions? opts = null)
public CaCertificate(String name, CaCertificateArgs args)
public CaCertificate(String name, CaCertificateArgs args, CustomResourceOptions options)
type: alicloud:slb:CaCertificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CaCertificateArgs
- 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 CaCertificateArgs
- 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 CaCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CaCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CaCertificateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CaCertificate 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 CaCertificate resource accepts the following input properties:
- Certificate string
the content of the CA certificate.
- Ca
Certificate stringName Name of the CA Certificate.
- Name string
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- Resource
Group stringId The Id of resource group which the slb_ca certificate belongs.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Ca
Certificate string the content of the CA certificate.
- Ca
Certificate stringName Name of the CA Certificate.
- Name string
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- Resource
Group stringId The Id of resource group which the slb_ca certificate belongs.
- map[string]interface{}
A mapping of tags to assign to the resource.
- ca
Certificate String the content of the CA certificate.
- ca
Certificate StringName Name of the CA Certificate.
- name String
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- resource
Group StringId The Id of resource group which the slb_ca certificate belongs.
- Map<String,Object>
A mapping of tags to assign to the resource.
- ca
Certificate string the content of the CA certificate.
- ca
Certificate stringName Name of the CA Certificate.
- name string
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- resource
Group stringId The Id of resource group which the slb_ca certificate belongs.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- ca_
certificate str the content of the CA certificate.
- ca_
certificate_ strname Name of the CA Certificate.
- name str
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- resource_
group_ strid The Id of resource group which the slb_ca certificate belongs.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- ca
Certificate String the content of the CA certificate.
- ca
Certificate StringName Name of the CA Certificate.
- name String
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- resource
Group StringId The Id of resource group which the slb_ca certificate belongs.
- Map<Any>
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the CaCertificate resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing CaCertificate Resource
Get an existing CaCertificate 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?: CaCertificateState, opts?: CustomResourceOptions): CaCertificate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ca_certificate: Optional[str] = None,
ca_certificate_name: Optional[str] = None,
name: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None) -> CaCertificate
func GetCaCertificate(ctx *Context, name string, id IDInput, state *CaCertificateState, opts ...ResourceOption) (*CaCertificate, error)
public static CaCertificate Get(string name, Input<string> id, CaCertificateState? state, CustomResourceOptions? opts = null)
public static CaCertificate get(String name, Output<String> id, CaCertificateState 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.
- Ca
Certificate stringName Name of the CA Certificate.
- Certificate string
the content of the CA certificate.
- Name string
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- Resource
Group stringId The Id of resource group which the slb_ca certificate belongs.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Ca
Certificate string the content of the CA certificate.
- Ca
Certificate stringName Name of the CA Certificate.
- Name string
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- Resource
Group stringId The Id of resource group which the slb_ca certificate belongs.
- map[string]interface{}
A mapping of tags to assign to the resource.
- ca
Certificate String the content of the CA certificate.
- ca
Certificate StringName Name of the CA Certificate.
- name String
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- resource
Group StringId The Id of resource group which the slb_ca certificate belongs.
- Map<String,Object>
A mapping of tags to assign to the resource.
- ca
Certificate string the content of the CA certificate.
- ca
Certificate stringName Name of the CA Certificate.
- name string
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- resource
Group stringId The Id of resource group which the slb_ca certificate belongs.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- ca_
certificate str the content of the CA certificate.
- ca_
certificate_ strname Name of the CA Certificate.
- name str
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- resource_
group_ strid The Id of resource group which the slb_ca certificate belongs.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- ca
Certificate String the content of the CA certificate.
- ca
Certificate StringName Name of the CA Certificate.
- name String
Field
name
has been deprecated from provider version 1.123.1. New fieldca_certificate_name
insteadField 'name' has been deprecated from provider version 1.123.1. New field 'ca_certificate_name' instead
- resource
Group StringId The Id of resource group which the slb_ca certificate belongs.
- Map<Any>
A mapping of tags to assign to the resource.
Import
Server Load balancer CA Certificate can be imported using the id, e.g.
$ pulumi import alicloud:slb/caCertificate:CaCertificate example abc123456
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.