published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
Provides a SSL Certificates Pca Cert Sync resource. The resource synchronizes existing PCA (private CA) client certificates to the SSL Certificates service in one batch, the same operation as “Batch Synchronize to SSL Certificates” in the PCA certificate console.
For information about SSL Certificates Pca Cert Sync and how to use it, see What is Pca Cert Sync.
NOTE: Available since v1.294.0.
NOTE: The synchronization is a one-shot operation. The API returns no server-side object, and the synchronized certificates cannot be located by PCA identifier on the SSL Certificates side, so the resource does not refresh anything after creation. Changing the
idslist recreates the resource, which re-runs the synchronization. Destroying the resource only removes it from the Terraform state; the synchronized certificates remain in the SSL Certificates service. The server processes the synchronization asynchronously: shortly after the apply, attempts to delete the synchronized certificates from the PCA side may be rejected until the processing finishes.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const root = new alicloud.sslcertificatesservice.PcaCertificate("root", {
organization: "a",
years: 1,
locality: "a",
organizationUnit: "a",
state: "a",
commonName: "cbc.certqa.cn",
});
const sub = new alicloud.sslcertificatesservice.PcaCertificate("sub", {
parentIdentifier: root.id,
organization: "a",
years: 1,
locality: "a",
organizationUnit: "a",
state: "a",
commonName: "cbc.certqa.cn",
algorithm: "RSA_2048",
certificateType: "SUB_ROOT",
enableCrl: true,
});
const _default: alicloud.sslcertificatesservicepcacert.SslCertificatesServicePcaCert[] = [];
for (let range = 0; range < 2; range++) {
_default.push(new alicloud.sslcertificatesservicepcacert.SslCertificatesServicePcaCert(`default-${range}`, {
days: 1,
parentIdentifier: sub.id,
algorithm: "RSA_2048",
commonName: `terraform-${range}`,
organization: "terraform",
state: "Beijing",
countryCode: "cn",
}));
}
const defaultSync = new alicloud.sslcertificatesservicepcacert.Sync("default", {ids: _default.map(__item => __item.id)});
import pulumi
from typing import Any
import pulumi_alicloud as alicloud
root = alicloud.sslcertificatesservice.PcaCertificate("root",
organization="a",
years=1,
locality="a",
organization_unit="a",
state="a",
common_name="cbc.certqa.cn")
sub = alicloud.sslcertificatesservice.PcaCertificate("sub",
parent_identifier=root.id,
organization="a",
years=1,
locality="a",
organization_unit="a",
state="a",
common_name="cbc.certqa.cn",
algorithm="RSA_2048",
certificate_type="SUB_ROOT",
enable_crl=True)
default: list[alicloud.sslcertificatesservicepcacert.SslCertificatesServicePcaCert] = []
for default_range in [{"value": i} for i in range(0, 2)]:
default.append(alicloud.sslcertificatesservicepcacert.SslCertificatesServicePcaCert(f"default-{default_range['value']}",
days=1,
parent_identifier=sub.id,
algorithm="RSA_2048",
common_name=f"terraform-{default_range['value']}",
organization="terraform",
state="Beijing",
country_code="cn"))
default_sync = alicloud.sslcertificatesservicepcacert.Sync("default", ids=[__item.id for __item in default])
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sslcertificatesservice"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sslcertificatesservicepcacert"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
root, err := sslcertificatesservice.NewPcaCertificate(ctx, "root", &sslcertificatesservice.PcaCertificateArgs{
Organization: pulumi.String("a"),
Years: pulumi.Int(1),
Locality: pulumi.String("a"),
OrganizationUnit: pulumi.String("a"),
State: pulumi.String("a"),
CommonName: pulumi.String("cbc.certqa.cn"),
})
if err != nil {
return err
}
sub, err := sslcertificatesservice.NewPcaCertificate(ctx, "sub", &sslcertificatesservice.PcaCertificateArgs{
ParentIdentifier: root.ID().ToIDOutput().ToStringOutput(),
Organization: pulumi.String("a"),
Years: pulumi.Int(1),
Locality: pulumi.String("a"),
OrganizationUnit: pulumi.String("a"),
State: pulumi.String("a"),
CommonName: pulumi.String("cbc.certqa.cn"),
Algorithm: pulumi.String("RSA_2048"),
CertificateType: pulumi.String("SUB_ROOT"),
EnableCrl: pulumi.Bool(true),
})
if err != nil {
return err
}
var _default []*sslcertificatesservicepcacert.SslCertificatesServicePcaCert
for index := 0; index < 2; index++ {
key0 := index
val0 := index
__res, err := sslcertificatesservicepcacert.NewSslCertificatesServicePcaCert(ctx, fmt.Sprintf("default-%v", key0), &sslcertificatesservicepcacert.SslCertificatesServicePcaCertArgs{
Days: pulumi.Int(1),
ParentIdentifier: sub.ID().ToIDOutput().ToStringOutput(),
Algorithm: pulumi.String("RSA_2048"),
CommonName: pulumi.Sprintf("terraform-%v", val0),
Organization: pulumi.String("terraform"),
State: pulumi.String("Beijing"),
CountryCode: pulumi.String("cn"),
})
if err != nil {
return err
}
_default = append(_default, __res)
}
var splat0 pulumi.IDArray
for _, val0 := range _default {
splat0 = append(splat0, val0.ID())
}
_, err = sslcertificatesservicepcacert.NewSync(ctx, "default", &sslcertificatesservicepcacert.SyncArgs{
Ids: toPulumiIDArray(splat0),
})
if err != nil {
return err
}
return nil
})
}
func toPulumiIDArray(arr []pulumi.ID) pulumi.IDArray {
var pulumiArr pulumi.IDArray
for _, v := range arr {
pulumiArr = append(pulumiArr, pulumi.ID(v))
}
return pulumiArr
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var root = new AliCloud.SslCertificatesService.PcaCertificate("root", new()
{
Organization = "a",
Years = 1,
Locality = "a",
OrganizationUnit = "a",
State = "a",
CommonName = "cbc.certqa.cn",
});
var sub = new AliCloud.SslCertificatesService.PcaCertificate("sub", new()
{
ParentIdentifier = root.Id,
Organization = "a",
Years = 1,
Locality = "a",
OrganizationUnit = "a",
State = "a",
CommonName = "cbc.certqa.cn",
Algorithm = "RSA_2048",
CertificateType = "SUB_ROOT",
EnableCrl = true,
});
var @default = new List<AliCloud.SslCertificatesServicePcaCert.SslCertificatesServicePcaCert>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
@default.Add(new AliCloud.SslCertificatesServicePcaCert.SslCertificatesServicePcaCert($"default-{range.Value}", new()
{
Days = 1,
ParentIdentifier = sub.Id,
Algorithm = "RSA_2048",
CommonName = $"terraform-{range.Value}",
Organization = "terraform",
State = "Beijing",
CountryCode = "cn",
}));
}
var defaultSync = new AliCloud.SslCertificatesServicePcaCert.Sync("default", new()
{
Ids = @default.Select(__item => __item.Id).ToList(),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.sslcertificatesservice.PcaCertificate;
import com.pulumi.alicloud.sslcertificatesservice.PcaCertificateArgs;
import com.pulumi.alicloud.sslcertificatesservicepcacert.SslCertificatesServicePcaCert;
import com.pulumi.alicloud.sslcertificatesservicepcacert.SslCertificatesServicePcaCertArgs;
import com.pulumi.alicloud.sslcertificatesservicepcacert.Sync;
import com.pulumi.alicloud.sslcertificatesservicepcacert.SyncArgs;
import com.pulumi.codegen.internal.KeyedValue;
import java.util.ArrayList;
import java.util.Arrays;
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 root = new PcaCertificate("root", PcaCertificateArgs.builder()
.organization("a")
.years(1)
.locality("a")
.organizationUnit("a")
.state("a")
.commonName("cbc.certqa.cn")
.build());
var sub = new PcaCertificate("sub", PcaCertificateArgs.builder()
.parentIdentifier(root.id())
.organization("a")
.years(1)
.locality("a")
.organizationUnit("a")
.state("a")
.commonName("cbc.certqa.cn")
.algorithm("RSA_2048")
.certificateType("SUB_ROOT")
.enableCrl(true)
.build());
for (var i = 0; i < 2; i++) {
new SslCertificatesServicePcaCert("default-" + i, SslCertificatesServicePcaCertArgs.builder()
.days(1)
.parentIdentifier(sub.id())
.algorithm("RSA_2048")
.commonName(String.format("terraform-%s", range.value()))
.organization("terraform")
.state("Beijing")
.countryCode("cn")
.build());
}
var defaultSync = new Sync("defaultSync", SyncArgs.builder()
.ids(default_.stream().map(element -> element.id()).collect(toList()))
.build());
}
}
Example coming soon!
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
resource "alicloud_sslcertificatesservice_pcacertificate" "root" {
organization = "a"
years = "1"
locality = "a"
organization_unit = "a"
state = "a"
common_name = "cbc.certqa.cn"
}
resource "alicloud_sslcertificatesservice_pcacertificate" "sub" {
parent_identifier = alicloud_sslcertificatesservice_pcacertificate.root.id
organization = "a"
years = "1"
locality = "a"
organization_unit = "a"
state = "a"
common_name = "cbc.certqa.cn"
algorithm = "RSA_2048"
certificate_type = "SUB_ROOT"
enable_crl = true
}
resource "alicloud_sslcertificatesservicepcacert_sslcertificatesservicepcacert" "default" {
count = 2
days = "1"
parent_identifier = alicloud_sslcertificatesservice_pcacertificate.sub.id
algorithm = "RSA_2048"
common_name ="terraform-${count.index}"
organization = "terraform"
state = "Beijing"
country_code = "cn"
}
resource "alicloud_sslcertificatesservicepcacert_sync" "default" {
ids = alicloud_sslcertificatesservicepcacert_sslcertificatesservicepcacert.default[*].id
}
Create Sync Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Sync(name: string, args: SyncArgs, opts?: CustomResourceOptions);@overload
def Sync(resource_name: str,
args: SyncArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Sync(resource_name: str,
opts: Optional[ResourceOptions] = None,
ids: Optional[Sequence[str]] = None)func NewSync(ctx *Context, name string, args SyncArgs, opts ...ResourceOption) (*Sync, error)public Sync(string name, SyncArgs args, CustomResourceOptions? opts = null)type: alicloud:sslcertificatesservicepcacert:Sync
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "alicloud_sslcertificatesservicepcacert_sync" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SyncArgs
- 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 SyncArgs
- 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 SyncArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SyncArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SyncArgs
- 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 syncResource = new AliCloud.SslCertificatesServicePcaCert.Sync("syncResource", new()
{
Ids = new[]
{
"string",
},
});
example, err := sslcertificatesservicepcacert.NewSync(ctx, "syncResource", &sslcertificatesservicepcacert.SyncArgs{
Ids: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "alicloud_sslcertificatesservicepcacert_sync" "syncResource" {
lifecycle {
create_before_destroy = true
}
ids = ["string"]
}
var syncResource = new Sync("syncResource", SyncArgs.builder()
.ids("string")
.build());
sync_resource = alicloud.sslcertificatesservicepcacert.Sync("syncResource", ids=["string"])
const syncResource = new alicloud.sslcertificatesservicepcacert.Sync("syncResource", {ids: ["string"]});
type: alicloud:sslcertificatesservicepcacert:Sync
properties:
ids:
- string
Sync 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 Sync resource accepts the following input properties:
- Ids List<string>
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- Ids []string
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids list(string)
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids List<String>
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids string[]
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids Sequence[str]
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids List<String>
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
Outputs
All input properties are implicitly available as output properties. Additionally, the Sync 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 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 Sync Resource
Get an existing Sync 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?: SyncState, opts?: CustomResourceOptions): Sync@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ids: Optional[Sequence[str]] = None) -> Syncfunc GetSync(ctx *Context, name string, id IDInput, state *SyncState, opts ...ResourceOption) (*Sync, error)public static Sync Get(string name, Input<string> id, SyncState? state, CustomResourceOptions? opts = null)public static Sync get(String name, Output<String> id, SyncState state, CustomResourceOptions options)resources: _: type: alicloud:sslcertificatesservicepcacert:Sync get: id: ${id}import {
to = alicloud_sslcertificatesservicepcacert_sync.example
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.
- Ids List<string>
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- Ids []string
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids list(string)
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids List<String>
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids string[]
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids Sequence[str]
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
- ids List<String>
- The identifiers of the PCA client certificates to synchronize to the SSL Certificates service. Multiple identifiers are joined into a single comma-separated request.
Import
SSL Certificates Pca Cert Sync can be imported using the id, which is the comma-separated list of the synchronized PCA certificate identifiers, e.g.
$ pulumi import alicloud:sslcertificatesservicepcacert/sync:Sync example 59425,59426
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
published on Thursday, Sep 17, 2026 by Pulumi