Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of cdn configs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooCdnCertificate = new volcengine.cdn.CdnCertificate("fooCdnCertificate", {
certificate: "",
privateKey: "",
desc: "tftest",
source: "cdn_cert_hosting",
});
const fooCdnDomain = new volcengine.cdn.CdnDomain("fooCdnDomain", {
domain: "tftest.byte-test.com",
serviceType: "web",
tags: [
{
key: "tfkey1",
value: "tfvalue1",
},
{
key: "tfkey2",
value: "tfvalue2",
},
],
domainConfig: pulumi.jsonStringify({
OriginProtocol: "https",
Origin: [{
OriginAction: {
OriginLines: [{
Address: "1.1.1.1",
HttpPort: "80",
HttpsPort: "443",
InstanceType: "ip",
OriginType: "primary",
PrivateBucketAccess: false,
Weight: "2",
}],
},
}],
HTTPS: {
CertInfo: {
CertId: fooCdnCertificate.id,
},
DisableHttp: false,
HTTP2: true,
Switch: true,
Ocsp: false,
TlsVersion: [
"tlsv1.1",
"tlsv1.2",
],
},
}),
});
const fooConfigs = volcengine.cdn.getConfigsOutput({
domain: fooCdnDomain.id,
});
import pulumi
import json
import pulumi_volcengine as volcengine
foo_cdn_certificate = volcengine.cdn.CdnCertificate("fooCdnCertificate",
certificate="",
private_key="",
desc="tftest",
source="cdn_cert_hosting")
foo_cdn_domain = volcengine.cdn.CdnDomain("fooCdnDomain",
domain="tftest.byte-test.com",
service_type="web",
tags=[
volcengine.cdn.CdnDomainTagArgs(
key="tfkey1",
value="tfvalue1",
),
volcengine.cdn.CdnDomainTagArgs(
key="tfkey2",
value="tfvalue2",
),
],
domain_config=pulumi.Output.json_dumps({
"OriginProtocol": "https",
"Origin": [{
"OriginAction": {
"OriginLines": [{
"Address": "1.1.1.1",
"HttpPort": "80",
"HttpsPort": "443",
"InstanceType": "ip",
"OriginType": "primary",
"PrivateBucketAccess": False,
"Weight": "2",
}],
},
}],
"HTTPS": {
"CertInfo": {
"CertId": foo_cdn_certificate.id,
},
"DisableHttp": False,
"HTTP2": True,
"Switch": True,
"Ocsp": False,
"TlsVersion": [
"tlsv1.1",
"tlsv1.2",
],
},
}))
foo_configs = volcengine.cdn.get_configs_output(domain=foo_cdn_domain.id)
package main
import (
"encoding/json"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cdn"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooCdnCertificate, err := cdn.NewCdnCertificate(ctx, "fooCdnCertificate", &cdn.CdnCertificateArgs{
Certificate: pulumi.String(""),
PrivateKey: pulumi.String(""),
Desc: pulumi.String("tftest"),
Source: pulumi.String("cdn_cert_hosting"),
})
if err != nil {
return err
}
fooCdnDomain, err := cdn.NewCdnDomain(ctx, "fooCdnDomain", &cdn.CdnDomainArgs{
Domain: pulumi.String("tftest.byte-test.com"),
ServiceType: pulumi.String("web"),
Tags: cdn.CdnDomainTagArray{
&cdn.CdnDomainTagArgs{
Key: pulumi.String("tfkey1"),
Value: pulumi.String("tfvalue1"),
},
&cdn.CdnDomainTagArgs{
Key: pulumi.String("tfkey2"),
Value: pulumi.String("tfvalue2"),
},
},
DomainConfig: fooCdnCertificate.ID().ApplyT(func(id string) (pulumi.String, error) {
var _zero pulumi.String
tmpJSON0, err := json.Marshal(map[string]interface{}{
"OriginProtocol": "https",
"Origin": []map[string]interface{}{
map[string]interface{}{
"OriginAction": map[string]interface{}{
"OriginLines": []map[string]interface{}{
map[string]interface{}{
"Address": "1.1.1.1",
"HttpPort": "80",
"HttpsPort": "443",
"InstanceType": "ip",
"OriginType": "primary",
"PrivateBucketAccess": false,
"Weight": "2",
},
},
},
},
},
"HTTPS": map[string]interface{}{
"CertInfo": map[string]interface{}{
"CertId": id,
},
"DisableHttp": false,
"HTTP2": true,
"Switch": true,
"Ocsp": false,
"TlsVersion": []string{
"tlsv1.1",
"tlsv1.2",
},
},
})
if err != nil {
return _zero, err
}
json0 := string(tmpJSON0)
return pulumi.String(json0), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
_ = cdn.GetConfigsOutput(ctx, cdn.GetConfigsOutputArgs{
Domain: fooCdnDomain.ID(),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooCdnCertificate = new Volcengine.Cdn.CdnCertificate("fooCdnCertificate", new()
{
Certificate = "",
PrivateKey = "",
Desc = "tftest",
Source = "cdn_cert_hosting",
});
var fooCdnDomain = new Volcengine.Cdn.CdnDomain("fooCdnDomain", new()
{
Domain = "tftest.byte-test.com",
ServiceType = "web",
Tags = new[]
{
new Volcengine.Cdn.Inputs.CdnDomainTagArgs
{
Key = "tfkey1",
Value = "tfvalue1",
},
new Volcengine.Cdn.Inputs.CdnDomainTagArgs
{
Key = "tfkey2",
Value = "tfvalue2",
},
},
DomainConfig = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
{
["OriginProtocol"] = "https",
["Origin"] = new[]
{
new Dictionary<string, object?>
{
["OriginAction"] = new Dictionary<string, object?>
{
["OriginLines"] = new[]
{
new Dictionary<string, object?>
{
["Address"] = "1.1.1.1",
["HttpPort"] = "80",
["HttpsPort"] = "443",
["InstanceType"] = "ip",
["OriginType"] = "primary",
["PrivateBucketAccess"] = false,
["Weight"] = "2",
},
},
},
},
},
["HTTPS"] = new Dictionary<string, object?>
{
["CertInfo"] = new Dictionary<string, object?>
{
["CertId"] = fooCdnCertificate.Id,
},
["DisableHttp"] = false,
["HTTP2"] = true,
["Switch"] = true,
["Ocsp"] = false,
["TlsVersion"] = new[]
{
"tlsv1.1",
"tlsv1.2",
},
},
})),
});
var fooConfigs = Volcengine.Cdn.GetConfigs.Invoke(new()
{
Domain = fooCdnDomain.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.cdn.CdnCertificate;
import com.pulumi.volcengine.cdn.CdnCertificateArgs;
import com.pulumi.volcengine.cdn.CdnDomain;
import com.pulumi.volcengine.cdn.CdnDomainArgs;
import com.pulumi.volcengine.cdn.inputs.CdnDomainTagArgs;
import com.pulumi.volcengine.cdn.CdnFunctions;
import com.pulumi.volcengine.cdn.inputs.GetConfigsArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 fooCdnCertificate = new CdnCertificate("fooCdnCertificate", CdnCertificateArgs.builder()
.certificate("")
.privateKey("")
.desc("tftest")
.source("cdn_cert_hosting")
.build());
var fooCdnDomain = new CdnDomain("fooCdnDomain", CdnDomainArgs.builder()
.domain("tftest.byte-test.com")
.serviceType("web")
.tags(
CdnDomainTagArgs.builder()
.key("tfkey1")
.value("tfvalue1")
.build(),
CdnDomainTagArgs.builder()
.key("tfkey2")
.value("tfvalue2")
.build())
.domainConfig(fooCdnCertificate.id().applyValue(id -> serializeJson(
jsonObject(
jsonProperty("OriginProtocol", "https"),
jsonProperty("Origin", jsonArray(jsonObject(
jsonProperty("OriginAction", jsonObject(
jsonProperty("OriginLines", jsonArray(jsonObject(
jsonProperty("Address", "1.1.1.1"),
jsonProperty("HttpPort", "80"),
jsonProperty("HttpsPort", "443"),
jsonProperty("InstanceType", "ip"),
jsonProperty("OriginType", "primary"),
jsonProperty("PrivateBucketAccess", false),
jsonProperty("Weight", "2")
)))
))
))),
jsonProperty("HTTPS", jsonObject(
jsonProperty("CertInfo", jsonObject(
jsonProperty("CertId", id)
)),
jsonProperty("DisableHttp", false),
jsonProperty("HTTP2", true),
jsonProperty("Switch", true),
jsonProperty("Ocsp", false),
jsonProperty("TlsVersion", jsonArray(
"tlsv1.1",
"tlsv1.2"
))
))
))))
.build());
final var fooConfigs = CdnFunctions.getConfigs(GetConfigsArgs.builder()
.domain(fooCdnDomain.id())
.build());
}
}
resources:
fooCdnCertificate:
type: volcengine:cdn:CdnCertificate
properties:
certificate:
privateKey:
desc: tftest
source: cdn_cert_hosting
fooCdnDomain:
type: volcengine:cdn:CdnDomain
properties:
domain: tftest.byte-test.com
serviceType: web
tags:
- key: tfkey1
value: tfvalue1
- key: tfkey2
value: tfvalue2
domainConfig:
fn::toJSON:
OriginProtocol: https
Origin:
- OriginAction:
OriginLines:
- Address: 1.1.1.1
HttpPort: '80'
HttpsPort: '443'
InstanceType: ip
OriginType: primary
PrivateBucketAccess: false
Weight: '2'
HTTPS:
CertInfo:
CertId: ${fooCdnCertificate.id}
DisableHttp: false
HTTP2: true
Switch: true
Ocsp: false
TlsVersion:
- tlsv1.1
- tlsv1.2
variables:
fooConfigs:
fn::invoke:
Function: volcengine:cdn:getConfigs
Arguments:
domain: ${fooCdnDomain.id}
Using getConfigs
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getConfigs(args: GetConfigsArgs, opts?: InvokeOptions): Promise<GetConfigsResult>
function getConfigsOutput(args: GetConfigsOutputArgs, opts?: InvokeOptions): Output<GetConfigsResult>def get_configs(domain: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetConfigsResult
def get_configs_output(domain: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConfigsResult]func GetConfigs(ctx *Context, args *GetConfigsArgs, opts ...InvokeOption) (*GetConfigsResult, error)
func GetConfigsOutput(ctx *Context, args *GetConfigsOutputArgs, opts ...InvokeOption) GetConfigsResultOutput> Note: This function is named GetConfigs in the Go SDK.
public static class GetConfigs
{
public static Task<GetConfigsResult> InvokeAsync(GetConfigsArgs args, InvokeOptions? opts = null)
public static Output<GetConfigsResult> Invoke(GetConfigsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetConfigsResult> getConfigs(GetConfigsArgs args, InvokeOptions options)
public static Output<GetConfigsResult> getConfigs(GetConfigsArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:cdn/getConfigs:getConfigs
arguments:
# arguments dictionaryThe following arguments are supported:
- Domain string
- The domain name.
- Output
File string - File name where to save data source results.
- Domain string
- The domain name.
- Output
File string - File name where to save data source results.
- domain String
- The domain name.
- output
File String - File name where to save data source results.
- domain string
- The domain name.
- output
File string - File name where to save data source results.
- domain str
- The domain name.
- output_
file str - File name where to save data source results.
- domain String
- The domain name.
- output
File String - File name where to save data source results.
getConfigs Result
The following output properties are available:
- Domain string
- The domain name.
- Domain
Configs List<GetConfigs Domain Config> - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Output
File string
- Domain string
- The domain name.
- Domain
Configs []GetConfigs Domain Config - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Output
File string
- domain String
- The domain name.
- domain
Configs List<GetConfigs Domain Config> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of query.
- output
File String
- domain string
- The domain name.
- domain
Configs GetConfigs Domain Config[] - The collection of query.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of query.
- output
File string
- domain str
- The domain name.
- domain_
configs Sequence[GetConfigs Domain Config] - The collection of query.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of query.
- output_
file str
- domain String
- The domain name.
- domain
Configs List<Property Map> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of query.
- output
File String
Supporting Types
GetConfigsDomainConfig
- Cname string
- The cname of the domain.
- Create
Time int - The create time of the domain.
- Domain string
- The domain name.
- Lock
Status string - Indicates whether the configuration of this domain name is allowed to be changed.
- Project string
- The project name.
- Service
Region string - The service region of the domain.
- Service
Type string - The service type of the domain.
- Status string
- The status of the domain.
- Update
Time int - The update time of the domain.
- Cname string
- The cname of the domain.
- Create
Time int - The create time of the domain.
- Domain string
- The domain name.
- Lock
Status string - Indicates whether the configuration of this domain name is allowed to be changed.
- Project string
- The project name.
- Service
Region string - The service region of the domain.
- Service
Type string - The service type of the domain.
- Status string
- The status of the domain.
- Update
Time int - The update time of the domain.
- cname String
- The cname of the domain.
- create
Time Integer - The create time of the domain.
- domain String
- The domain name.
- lock
Status String - Indicates whether the configuration of this domain name is allowed to be changed.
- project String
- The project name.
- service
Region String - The service region of the domain.
- service
Type String - The service type of the domain.
- status String
- The status of the domain.
- update
Time Integer - The update time of the domain.
- cname string
- The cname of the domain.
- create
Time number - The create time of the domain.
- domain string
- The domain name.
- lock
Status string - Indicates whether the configuration of this domain name is allowed to be changed.
- project string
- The project name.
- service
Region string - The service region of the domain.
- service
Type string - The service type of the domain.
- status string
- The status of the domain.
- update
Time number - The update time of the domain.
- cname str
- The cname of the domain.
- create_
time int - The create time of the domain.
- domain str
- The domain name.
- lock_
status str - Indicates whether the configuration of this domain name is allowed to be changed.
- project str
- The project name.
- service_
region str - The service region of the domain.
- service_
type str - The service type of the domain.
- status str
- The status of the domain.
- update_
time int - The update time of the domain.
- cname String
- The cname of the domain.
- create
Time Number - The create time of the domain.
- domain String
- The domain name.
- lock
Status String - Indicates whether the configuration of this domain name is allowed to be changed.
- project String
- The project name.
- service
Region String - The service region of the domain.
- service
Type String - The service type of the domain.
- status String
- The status of the domain.
- update
Time Number - The update time of the domain.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
