opentelekomcloud.ApigwCertificateV2
Explore with Pulumi AI
Manages an APIGW SSL certificate resource within OpenTelekomCloud.
Example Usage
Manages a global SSL certificate
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const certificateName = config.requireObject("certificateName");
const certificateContent = config.get("certificateContent") || "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'";
const certificatePrivateKey = config.get("certificatePrivateKey") || "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'";
const test = new opentelekomcloud.ApigwCertificateV2("test", {
content: certificateContent,
privateKey: certificatePrivateKey,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
certificate_name = config.require_object("certificateName")
certificate_content = config.get("certificateContent")
if certificate_content is None:
certificate_content = "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'"
certificate_private_key = config.get("certificatePrivateKey")
if certificate_private_key is None:
certificate_private_key = "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'"
test = opentelekomcloud.ApigwCertificateV2("test",
content=certificate_content,
private_key=certificate_private_key)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
certificateName := cfg.RequireObject("certificateName")
certificateContent := "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'"
if param := cfg.Get("certificateContent"); param != "" {
certificateContent = param
}
certificatePrivateKey := "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'"
if param := cfg.Get("certificatePrivateKey"); param != "" {
certificatePrivateKey = param
}
_, err := opentelekomcloud.NewApigwCertificateV2(ctx, "test", &opentelekomcloud.ApigwCertificateV2Args{
Content: pulumi.String(certificateContent),
PrivateKey: pulumi.String(certificatePrivateKey),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var certificateName = config.RequireObject<dynamic>("certificateName");
var certificateContent = config.Get("certificateContent") ?? "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'";
var certificatePrivateKey = config.Get("certificatePrivateKey") ?? "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'";
var test = new Opentelekomcloud.ApigwCertificateV2("test", new()
{
Content = certificateContent,
PrivateKey = certificatePrivateKey,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ApigwCertificateV2;
import com.pulumi.opentelekomcloud.ApigwCertificateV2Args;
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) {
final var config = ctx.config();
final var certificateName = config.get("certificateName");
final var certificateContent = config.get("certificateContent").orElse("'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'");
final var certificatePrivateKey = config.get("certificatePrivateKey").orElse("'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'");
var test = new ApigwCertificateV2("test", ApigwCertificateV2Args.builder()
.content(certificateContent)
.privateKey(certificatePrivateKey)
.build());
}
}
configuration:
certificateName:
type: dynamic
certificateContent:
type: string
default: '''-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'''
certificatePrivateKey:
type: string
default: '''-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'''
resources:
test:
type: opentelekomcloud:ApigwCertificateV2
properties:
content: ${certificateContent}
privateKey: ${certificatePrivateKey}
Manages a local SSL certificate in a specified dedicated APIGW instance
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const certificateName = config.requireObject("certificateName");
const certificateContent = config.get("certificateContent") || "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'";
const certificatePrivateKey = config.get("certificatePrivateKey") || "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'";
const dedicatedInstanceId = config.requireObject("dedicatedInstanceId");
const test = new opentelekomcloud.ApigwCertificateV2("test", {
content: certificateContent,
privateKey: certificatePrivateKey,
type: "instance",
instanceId: dedicatedInstanceId,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
certificate_name = config.require_object("certificateName")
certificate_content = config.get("certificateContent")
if certificate_content is None:
certificate_content = "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'"
certificate_private_key = config.get("certificatePrivateKey")
if certificate_private_key is None:
certificate_private_key = "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'"
dedicated_instance_id = config.require_object("dedicatedInstanceId")
test = opentelekomcloud.ApigwCertificateV2("test",
content=certificate_content,
private_key=certificate_private_key,
type="instance",
instance_id=dedicated_instance_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
certificateName := cfg.RequireObject("certificateName")
certificateContent := "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'"
if param := cfg.Get("certificateContent"); param != "" {
certificateContent = param
}
certificatePrivateKey := "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'"
if param := cfg.Get("certificatePrivateKey"); param != "" {
certificatePrivateKey = param
}
dedicatedInstanceId := cfg.RequireObject("dedicatedInstanceId")
_, err := opentelekomcloud.NewApigwCertificateV2(ctx, "test", &opentelekomcloud.ApigwCertificateV2Args{
Content: pulumi.String(certificateContent),
PrivateKey: pulumi.String(certificatePrivateKey),
Type: pulumi.String("instance"),
InstanceId: pulumi.Any(dedicatedInstanceId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var certificateName = config.RequireObject<dynamic>("certificateName");
var certificateContent = config.Get("certificateContent") ?? "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'";
var certificatePrivateKey = config.Get("certificatePrivateKey") ?? "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'";
var dedicatedInstanceId = config.RequireObject<dynamic>("dedicatedInstanceId");
var test = new Opentelekomcloud.ApigwCertificateV2("test", new()
{
Content = certificateContent,
PrivateKey = certificatePrivateKey,
Type = "instance",
InstanceId = dedicatedInstanceId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ApigwCertificateV2;
import com.pulumi.opentelekomcloud.ApigwCertificateV2Args;
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) {
final var config = ctx.config();
final var certificateName = config.get("certificateName");
final var certificateContent = config.get("certificateContent").orElse("'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'");
final var certificatePrivateKey = config.get("certificatePrivateKey").orElse("'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'");
final var dedicatedInstanceId = config.get("dedicatedInstanceId");
var test = new ApigwCertificateV2("test", ApigwCertificateV2Args.builder()
.content(certificateContent)
.privateKey(certificatePrivateKey)
.type("instance")
.instanceId(dedicatedInstanceId)
.build());
}
}
configuration:
certificateName:
type: dynamic
certificateContent:
type: string
default: '''-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'''
certificatePrivateKey:
type: string
default: '''-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'''
dedicatedInstanceId:
type: dynamic
resources:
test:
type: opentelekomcloud:ApigwCertificateV2
properties:
content: ${certificateContent}
privateKey: ${certificatePrivateKey}
type: instance
instanceId: ${dedicatedInstanceId}
Manages a local SSL certificate (with the ROOT CA certificate)
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const certificateName = config.requireObject("certificateName");
const certificateContent = config.get("certificateContent") || "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'";
const certificatePrivateKey = config.get("certificatePrivateKey") || "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'";
const rootCaCertificateContent = config.get("rootCaCertificateContent") || "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'";
const dedicatedInstanceId = config.requireObject("dedicatedInstanceId");
const test = new opentelekomcloud.ApigwCertificateV2("test", {
content: certificateContent,
privateKey: certificatePrivateKey,
trustedRootCa: rootCaCertificateContent,
type: "instance",
instanceId: dedicatedInstanceId,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
certificate_name = config.require_object("certificateName")
certificate_content = config.get("certificateContent")
if certificate_content is None:
certificate_content = "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'"
certificate_private_key = config.get("certificatePrivateKey")
if certificate_private_key is None:
certificate_private_key = "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'"
root_ca_certificate_content = config.get("rootCaCertificateContent")
if root_ca_certificate_content is None:
root_ca_certificate_content = "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'"
dedicated_instance_id = config.require_object("dedicatedInstanceId")
test = opentelekomcloud.ApigwCertificateV2("test",
content=certificate_content,
private_key=certificate_private_key,
trusted_root_ca=root_ca_certificate_content,
type="instance",
instance_id=dedicated_instance_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
certificateName := cfg.RequireObject("certificateName")
certificateContent := "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'"
if param := cfg.Get("certificateContent"); param != "" {
certificateContent = param
}
certificatePrivateKey := "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'"
if param := cfg.Get("certificatePrivateKey"); param != "" {
certificatePrivateKey = param
}
rootCaCertificateContent := "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'"
if param := cfg.Get("rootCaCertificateContent"); param != "" {
rootCaCertificateContent = param
}
dedicatedInstanceId := cfg.RequireObject("dedicatedInstanceId")
_, err := opentelekomcloud.NewApigwCertificateV2(ctx, "test", &opentelekomcloud.ApigwCertificateV2Args{
Content: pulumi.String(certificateContent),
PrivateKey: pulumi.String(certificatePrivateKey),
TrustedRootCa: pulumi.String(rootCaCertificateContent),
Type: pulumi.String("instance"),
InstanceId: pulumi.Any(dedicatedInstanceId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var certificateName = config.RequireObject<dynamic>("certificateName");
var certificateContent = config.Get("certificateContent") ?? "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'";
var certificatePrivateKey = config.Get("certificatePrivateKey") ?? "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'";
var rootCaCertificateContent = config.Get("rootCaCertificateContent") ?? "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'";
var dedicatedInstanceId = config.RequireObject<dynamic>("dedicatedInstanceId");
var test = new Opentelekomcloud.ApigwCertificateV2("test", new()
{
Content = certificateContent,
PrivateKey = certificatePrivateKey,
TrustedRootCa = rootCaCertificateContent,
Type = "instance",
InstanceId = dedicatedInstanceId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ApigwCertificateV2;
import com.pulumi.opentelekomcloud.ApigwCertificateV2Args;
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) {
final var config = ctx.config();
final var certificateName = config.get("certificateName");
final var certificateContent = config.get("certificateContent").orElse("'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'");
final var certificatePrivateKey = config.get("certificatePrivateKey").orElse("'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'");
final var rootCaCertificateContent = config.get("rootCaCertificateContent").orElse("'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'");
final var dedicatedInstanceId = config.get("dedicatedInstanceId");
var test = new ApigwCertificateV2("test", ApigwCertificateV2Args.builder()
.content(certificateContent)
.privateKey(certificatePrivateKey)
.trustedRootCa(rootCaCertificateContent)
.type("instance")
.instanceId(dedicatedInstanceId)
.build());
}
}
configuration:
certificateName:
type: dynamic
certificateContent:
type: string
default: '''-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'''
certificatePrivateKey:
type: string
default: '''-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'''
rootCaCertificateContent:
type: string
default: '''-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'''
dedicatedInstanceId:
type: dynamic
resources:
test:
type: opentelekomcloud:ApigwCertificateV2
properties:
content: ${certificateContent}
privateKey: ${certificatePrivateKey}
trustedRootCa: ${rootCaCertificateContent}
type: instance
instanceId: ${dedicatedInstanceId}
Create ApigwCertificateV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApigwCertificateV2(name: string, args: ApigwCertificateV2Args, opts?: CustomResourceOptions);
@overload
def ApigwCertificateV2(resource_name: str,
args: ApigwCertificateV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def ApigwCertificateV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
content: Optional[str] = None,
private_key: Optional[str] = None,
apigw_certificate_v2_id: Optional[str] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
trusted_root_ca: Optional[str] = None,
type: Optional[str] = None)
func NewApigwCertificateV2(ctx *Context, name string, args ApigwCertificateV2Args, opts ...ResourceOption) (*ApigwCertificateV2, error)
public ApigwCertificateV2(string name, ApigwCertificateV2Args args, CustomResourceOptions? opts = null)
public ApigwCertificateV2(String name, ApigwCertificateV2Args args)
public ApigwCertificateV2(String name, ApigwCertificateV2Args args, CustomResourceOptions options)
type: opentelekomcloud:ApigwCertificateV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ApigwCertificateV2Args
- 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 ApigwCertificateV2Args
- 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 ApigwCertificateV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApigwCertificateV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApigwCertificateV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var apigwCertificateV2Resource = new Opentelekomcloud.ApigwCertificateV2("apigwCertificateV2Resource", new()
{
Content = "string",
PrivateKey = "string",
ApigwCertificateV2Id = "string",
InstanceId = "string",
Name = "string",
TrustedRootCa = "string",
Type = "string",
});
example, err := opentelekomcloud.NewApigwCertificateV2(ctx, "apigwCertificateV2Resource", &opentelekomcloud.ApigwCertificateV2Args{
Content: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
ApigwCertificateV2Id: pulumi.String("string"),
InstanceId: pulumi.String("string"),
Name: pulumi.String("string"),
TrustedRootCa: pulumi.String("string"),
Type: pulumi.String("string"),
})
var apigwCertificateV2Resource = new ApigwCertificateV2("apigwCertificateV2Resource", ApigwCertificateV2Args.builder()
.content("string")
.privateKey("string")
.apigwCertificateV2Id("string")
.instanceId("string")
.name("string")
.trustedRootCa("string")
.type("string")
.build());
apigw_certificate_v2_resource = opentelekomcloud.ApigwCertificateV2("apigwCertificateV2Resource",
content="string",
private_key="string",
apigw_certificate_v2_id="string",
instance_id="string",
name="string",
trusted_root_ca="string",
type="string")
const apigwCertificateV2Resource = new opentelekomcloud.ApigwCertificateV2("apigwCertificateV2Resource", {
content: "string",
privateKey: "string",
apigwCertificateV2Id: "string",
instanceId: "string",
name: "string",
trustedRootCa: "string",
type: "string",
});
type: opentelekomcloud:ApigwCertificateV2
properties:
apigwCertificateV2Id: string
content: string
instanceId: string
name: string
privateKey: string
trustedRootCa: string
type: string
ApigwCertificateV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ApigwCertificateV2 resource accepts the following input properties:
- Content string
- Specifies the certificate content.
- Private
Key string - Specifies the private key of the certificate.
- Apigw
Certificate stringV2Id - The certificate ID.
- Instance
Id string - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - Name string
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - Trusted
Root stringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- Type string
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- Content string
- Specifies the certificate content.
- Private
Key string - Specifies the private key of the certificate.
- Apigw
Certificate stringV2Id - The certificate ID.
- Instance
Id string - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - Name string
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - Trusted
Root stringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- Type string
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- content String
- Specifies the certificate content.
- private
Key String - Specifies the private key of the certificate.
- apigw
Certificate StringV2Id - The certificate ID.
- instance
Id String - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - name String
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - trusted
Root StringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- type String
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- content string
- Specifies the certificate content.
- private
Key string - Specifies the private key of the certificate.
- apigw
Certificate stringV2Id - The certificate ID.
- instance
Id string - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - name string
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - trusted
Root stringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- type string
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- content str
- Specifies the certificate content.
- private_
key str - Specifies the private key of the certificate.
- apigw_
certificate_ strv2_ id - The certificate ID.
- instance_
id str - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - name str
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - trusted_
root_ strca Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- type str
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- content String
- Specifies the certificate content.
- private
Key String - Specifies the private key of the certificate.
- apigw
Certificate StringV2Id - The certificate ID.
- instance
Id String - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - name String
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - trusted
Root StringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- type String
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApigwCertificateV2 resource produces the following output properties:
- Effected
At string - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- Expires
At string - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- The region where the certificate is located.
- Sans List<string>
- The SAN (Subject Alternative Names) of the certificate.
- Signature
Algorithm string - What signature algorithm the certificate uses.
- Effected
At string - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- Expires
At string - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- The region where the certificate is located.
- Sans []string
- The SAN (Subject Alternative Names) of the certificate.
- Signature
Algorithm string - What signature algorithm the certificate uses.
- effected
At String - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- expires
At String - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- The region where the certificate is located.
- sans List<String>
- The SAN (Subject Alternative Names) of the certificate.
- signature
Algorithm String - What signature algorithm the certificate uses.
- effected
At string - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- expires
At string - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- id string
- The provider-assigned unique ID for this managed resource.
- region string
- The region where the certificate is located.
- sans string[]
- The SAN (Subject Alternative Names) of the certificate.
- signature
Algorithm string - What signature algorithm the certificate uses.
- effected_
at str - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- expires_
at str - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- id str
- The provider-assigned unique ID for this managed resource.
- region str
- The region where the certificate is located.
- sans Sequence[str]
- The SAN (Subject Alternative Names) of the certificate.
- signature_
algorithm str - What signature algorithm the certificate uses.
- effected
At String - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- expires
At String - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- The region where the certificate is located.
- sans List<String>
- The SAN (Subject Alternative Names) of the certificate.
- signature
Algorithm String - What signature algorithm the certificate uses.
Look up Existing ApigwCertificateV2 Resource
Get an existing ApigwCertificateV2 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?: ApigwCertificateV2State, opts?: CustomResourceOptions): ApigwCertificateV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apigw_certificate_v2_id: Optional[str] = None,
content: Optional[str] = None,
effected_at: Optional[str] = None,
expires_at: Optional[str] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
private_key: Optional[str] = None,
region: Optional[str] = None,
sans: Optional[Sequence[str]] = None,
signature_algorithm: Optional[str] = None,
trusted_root_ca: Optional[str] = None,
type: Optional[str] = None) -> ApigwCertificateV2
func GetApigwCertificateV2(ctx *Context, name string, id IDInput, state *ApigwCertificateV2State, opts ...ResourceOption) (*ApigwCertificateV2, error)
public static ApigwCertificateV2 Get(string name, Input<string> id, ApigwCertificateV2State? state, CustomResourceOptions? opts = null)
public static ApigwCertificateV2 get(String name, Output<String> id, ApigwCertificateV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:ApigwCertificateV2 get: id: ${id}
- 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.
- Apigw
Certificate stringV2Id - The certificate ID.
- Content string
- Specifies the certificate content.
- Effected
At string - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- Expires
At string - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- Instance
Id string - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - Name string
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - Private
Key string - Specifies the private key of the certificate.
- Region string
- The region where the certificate is located.
- Sans List<string>
- The SAN (Subject Alternative Names) of the certificate.
- Signature
Algorithm string - What signature algorithm the certificate uses.
- Trusted
Root stringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- Type string
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- Apigw
Certificate stringV2Id - The certificate ID.
- Content string
- Specifies the certificate content.
- Effected
At string - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- Expires
At string - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- Instance
Id string - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - Name string
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - Private
Key string - Specifies the private key of the certificate.
- Region string
- The region where the certificate is located.
- Sans []string
- The SAN (Subject Alternative Names) of the certificate.
- Signature
Algorithm string - What signature algorithm the certificate uses.
- Trusted
Root stringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- Type string
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- apigw
Certificate StringV2Id - The certificate ID.
- content String
- Specifies the certificate content.
- effected
At String - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- expires
At String - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- instance
Id String - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - name String
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - private
Key String - Specifies the private key of the certificate.
- region String
- The region where the certificate is located.
- sans List<String>
- The SAN (Subject Alternative Names) of the certificate.
- signature
Algorithm String - What signature algorithm the certificate uses.
- trusted
Root StringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- type String
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- apigw
Certificate stringV2Id - The certificate ID.
- content string
- Specifies the certificate content.
- effected
At string - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- expires
At string - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- instance
Id string - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - name string
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - private
Key string - Specifies the private key of the certificate.
- region string
- The region where the certificate is located.
- sans string[]
- The SAN (Subject Alternative Names) of the certificate.
- signature
Algorithm string - What signature algorithm the certificate uses.
- trusted
Root stringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- type string
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- apigw_
certificate_ strv2_ id - The certificate ID.
- content str
- Specifies the certificate content.
- effected_
at str - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- expires_
at str - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- instance_
id str - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - name str
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - private_
key str - Specifies the private key of the certificate.
- region str
- The region where the certificate is located.
- sans Sequence[str]
- The SAN (Subject Alternative Names) of the certificate.
- signature_
algorithm str - What signature algorithm the certificate uses.
- trusted_
root_ strca Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- type str
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
- apigw
Certificate StringV2Id - The certificate ID.
- content String
- Specifies the certificate content.
- effected
At String - The effective time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- expires
At String - The expiration time of the certificate, in RFC3339 format (YYYY-MM-DDThh:mm:ssZ).
- instance
Id String - Specifies the dedicated instance ID to which the certificate belongs.
Required if
type
is instance. Changing this will create a new resource. - name String
- Specifies the certificate name.
The valid length is limited from
4
to50
, only Chinese and English letters, digits and underscores (_) are allowed. The name must start with an English letter. - private
Key String - Specifies the private key of the certificate.
- region String
- The region where the certificate is located.
- sans List<String>
- The SAN (Subject Alternative Names) of the certificate.
- signature
Algorithm String - What signature algorithm the certificate uses.
- trusted
Root StringCa Specifies the trusted ROOT CA certificate.
Currently, the ROOT CA parameter only certificates of type
instance
are support.- type String
Specifies the certificate type. The valid values are as follows:
- instance
- global
Defaults to global. Changing this will create a new resource.
Import
Certificates can be imported using their id
, e.g.
bash
$ pulumi import opentelekomcloud:index/apigwCertificateV2:ApigwCertificateV2 test <id>
Note that the imported state may not be identical to your resource definition, due to some attributes missing from the
API response. The missing attributes include: content
, private_key
and trusted_root_ca
.
It is generally recommended running pulumi preview
after importing a certificate.
You can then decide if changes should be applied to the certificate, or the resource definition should be updated to
align with the certificate. Also, you can ignore changes as below.
hcl
resource “opentelekomcloud_apigw_certificate_v2” “test” {
lifecycle {
ignore_changes = [
content, private_key, trusted_root_ca,
]
}
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.