1. Packages
  2. Ibm Provider
  3. API Docs
  4. CisDnsRecordsImport
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.CisDnsRecordsImport

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides an IBM Cloud Internet Services DNS records import resource. This resource is associated with an IBM Cloud Internet Services instance and a CIS domain resource. It allows to import DNS records from file of a domain of a CIS instance. For more information, about CIS DNS records, refer to managing DNS records.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    // Import DNS Records of the domain
    const test = new ibm.CisDnsRecordsImport("test", {
        cisId: data.ibm_cis.cis.id,
        domainId: data.ibm_cis_domain.cis_domain.domain_id,
        file: "dns_records.txt",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    # Import DNS Records of the domain
    test = ibm.CisDnsRecordsImport("test",
        cis_id=data["ibm_cis"]["cis"]["id"],
        domain_id=data["ibm_cis_domain"]["cis_domain"]["domain_id"],
        file="dns_records.txt")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Import DNS Records of the domain
    		_, err := ibm.NewCisDnsRecordsImport(ctx, "test", &ibm.CisDnsRecordsImportArgs{
    			CisId:    pulumi.Any(data.Ibm_cis.Cis.Id),
    			DomainId: pulumi.Any(data.Ibm_cis_domain.Cis_domain.Domain_id),
    			File:     pulumi.String("dns_records.txt"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        // Import DNS Records of the domain
        var test = new Ibm.CisDnsRecordsImport("test", new()
        {
            CisId = data.Ibm_cis.Cis.Id,
            DomainId = data.Ibm_cis_domain.Cis_domain.Domain_id,
            File = "dns_records.txt",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.CisDnsRecordsImport;
    import com.pulumi.ibm.CisDnsRecordsImportArgs;
    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) {
            // Import DNS Records of the domain
            var test = new CisDnsRecordsImport("test", CisDnsRecordsImportArgs.builder()
                .cisId(data.ibm_cis().cis().id())
                .domainId(data.ibm_cis_domain().cis_domain().domain_id())
                .file("dns_records.txt")
                .build());
    
        }
    }
    
    resources:
      # Import DNS Records of the domain
      test:
        type: ibm:CisDnsRecordsImport
        properties:
          cisId: ${data.ibm_cis.cis.id}
          domainId: ${data.ibm_cis_domain.cis_domain.domain_id}
          file: dns_records.txt
    

    Create CisDnsRecordsImport Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CisDnsRecordsImport(name: string, args: CisDnsRecordsImportArgs, opts?: CustomResourceOptions);
    @overload
    def CisDnsRecordsImport(resource_name: str,
                            args: CisDnsRecordsImportArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def CisDnsRecordsImport(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            cis_id: Optional[str] = None,
                            domain_id: Optional[str] = None,
                            file: Optional[str] = None,
                            cis_dns_records_import_id: Optional[str] = None)
    func NewCisDnsRecordsImport(ctx *Context, name string, args CisDnsRecordsImportArgs, opts ...ResourceOption) (*CisDnsRecordsImport, error)
    public CisDnsRecordsImport(string name, CisDnsRecordsImportArgs args, CustomResourceOptions? opts = null)
    public CisDnsRecordsImport(String name, CisDnsRecordsImportArgs args)
    public CisDnsRecordsImport(String name, CisDnsRecordsImportArgs args, CustomResourceOptions options)
    
    type: ibm:CisDnsRecordsImport
    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 CisDnsRecordsImportArgs
    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 CisDnsRecordsImportArgs
    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 CisDnsRecordsImportArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CisDnsRecordsImportArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CisDnsRecordsImportArgs
    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 cisDnsRecordsImportResource = new Ibm.CisDnsRecordsImport("cisDnsRecordsImportResource", new()
    {
        CisId = "string",
        DomainId = "string",
        File = "string",
        CisDnsRecordsImportId = "string",
    });
    
    example, err := ibm.NewCisDnsRecordsImport(ctx, "cisDnsRecordsImportResource", &ibm.CisDnsRecordsImportArgs{
    	CisId:                 pulumi.String("string"),
    	DomainId:              pulumi.String("string"),
    	File:                  pulumi.String("string"),
    	CisDnsRecordsImportId: pulumi.String("string"),
    })
    
    var cisDnsRecordsImportResource = new CisDnsRecordsImport("cisDnsRecordsImportResource", CisDnsRecordsImportArgs.builder()
        .cisId("string")
        .domainId("string")
        .file("string")
        .cisDnsRecordsImportId("string")
        .build());
    
    cis_dns_records_import_resource = ibm.CisDnsRecordsImport("cisDnsRecordsImportResource",
        cis_id="string",
        domain_id="string",
        file="string",
        cis_dns_records_import_id="string")
    
    const cisDnsRecordsImportResource = new ibm.CisDnsRecordsImport("cisDnsRecordsImportResource", {
        cisId: "string",
        domainId: "string",
        file: "string",
        cisDnsRecordsImportId: "string",
    });
    
    type: ibm:CisDnsRecordsImport
    properties:
        cisDnsRecordsImportId: string
        cisId: string
        domainId: string
        file: string
    

    CisDnsRecordsImport 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 CisDnsRecordsImport resource accepts the following input properties:

    CisId string
    The ID of the IBM Cloud Internet Services instance.
    DomainId string
    The ID of the domain to import the DNS records.
    File string
    The DNS zone file that contains the details of the DNS records.
    CisDnsRecordsImportId string
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    CisId string
    The ID of the IBM Cloud Internet Services instance.
    DomainId string
    The ID of the domain to import the DNS records.
    File string
    The DNS zone file that contains the details of the DNS records.
    CisDnsRecordsImportId string
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    cisId String
    The ID of the IBM Cloud Internet Services instance.
    domainId String
    The ID of the domain to import the DNS records.
    file String
    The DNS zone file that contains the details of the DNS records.
    cisDnsRecordsImportId String
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    cisId string
    The ID of the IBM Cloud Internet Services instance.
    domainId string
    The ID of the domain to import the DNS records.
    file string
    The DNS zone file that contains the details of the DNS records.
    cisDnsRecordsImportId string
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    cis_id str
    The ID of the IBM Cloud Internet Services instance.
    domain_id str
    The ID of the domain to import the DNS records.
    file str
    The DNS zone file that contains the details of the DNS records.
    cis_dns_records_import_id str
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    cisId String
    The ID of the IBM Cloud Internet Services instance.
    domainId String
    The ID of the domain to import the DNS records.
    file String
    The DNS zone file that contains the details of the DNS records.
    cisDnsRecordsImportId String
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RecordsAdded double
    (String) The added records count from imported file.
    TotalRecordsParsed double
    (Integer) The parsed records count from imported file.
    Id string
    The provider-assigned unique ID for this managed resource.
    RecordsAdded float64
    (String) The added records count from imported file.
    TotalRecordsParsed float64
    (Integer) The parsed records count from imported file.
    id String
    The provider-assigned unique ID for this managed resource.
    recordsAdded Double
    (String) The added records count from imported file.
    totalRecordsParsed Double
    (Integer) The parsed records count from imported file.
    id string
    The provider-assigned unique ID for this managed resource.
    recordsAdded number
    (String) The added records count from imported file.
    totalRecordsParsed number
    (Integer) The parsed records count from imported file.
    id str
    The provider-assigned unique ID for this managed resource.
    records_added float
    (String) The added records count from imported file.
    total_records_parsed float
    (Integer) The parsed records count from imported file.
    id String
    The provider-assigned unique ID for this managed resource.
    recordsAdded Number
    (String) The added records count from imported file.
    totalRecordsParsed Number
    (Integer) The parsed records count from imported file.

    Look up Existing CisDnsRecordsImport Resource

    Get an existing CisDnsRecordsImport 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?: CisDnsRecordsImportState, opts?: CustomResourceOptions): CisDnsRecordsImport
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cis_dns_records_import_id: Optional[str] = None,
            cis_id: Optional[str] = None,
            domain_id: Optional[str] = None,
            file: Optional[str] = None,
            records_added: Optional[float] = None,
            total_records_parsed: Optional[float] = None) -> CisDnsRecordsImport
    func GetCisDnsRecordsImport(ctx *Context, name string, id IDInput, state *CisDnsRecordsImportState, opts ...ResourceOption) (*CisDnsRecordsImport, error)
    public static CisDnsRecordsImport Get(string name, Input<string> id, CisDnsRecordsImportState? state, CustomResourceOptions? opts = null)
    public static CisDnsRecordsImport get(String name, Output<String> id, CisDnsRecordsImportState state, CustomResourceOptions options)
    resources:  _:    type: ibm:CisDnsRecordsImport    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.
    The following state arguments are supported:
    CisDnsRecordsImportId string
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    CisId string
    The ID of the IBM Cloud Internet Services instance.
    DomainId string
    The ID of the domain to import the DNS records.
    File string
    The DNS zone file that contains the details of the DNS records.
    RecordsAdded double
    (String) The added records count from imported file.
    TotalRecordsParsed double
    (Integer) The parsed records count from imported file.
    CisDnsRecordsImportId string
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    CisId string
    The ID of the IBM Cloud Internet Services instance.
    DomainId string
    The ID of the domain to import the DNS records.
    File string
    The DNS zone file that contains the details of the DNS records.
    RecordsAdded float64
    (String) The added records count from imported file.
    TotalRecordsParsed float64
    (Integer) The parsed records count from imported file.
    cisDnsRecordsImportId String
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    cisId String
    The ID of the IBM Cloud Internet Services instance.
    domainId String
    The ID of the domain to import the DNS records.
    file String
    The DNS zone file that contains the details of the DNS records.
    recordsAdded Double
    (String) The added records count from imported file.
    totalRecordsParsed Double
    (Integer) The parsed records count from imported file.
    cisDnsRecordsImportId string
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    cisId string
    The ID of the IBM Cloud Internet Services instance.
    domainId string
    The ID of the domain to import the DNS records.
    file string
    The DNS zone file that contains the details of the DNS records.
    recordsAdded number
    (String) The added records count from imported file.
    totalRecordsParsed number
    (Integer) The parsed records count from imported file.
    cis_dns_records_import_id str
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    cis_id str
    The ID of the IBM Cloud Internet Services instance.
    domain_id str
    The ID of the domain to import the DNS records.
    file str
    The DNS zone file that contains the details of the DNS records.
    records_added float
    (String) The added records count from imported file.
    total_records_parsed float
    (Integer) The parsed records count from imported file.
    cisDnsRecordsImportId String
    (String) The record ID. It is a combination of <total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id> attributes concatenated with :.
    cisId String
    The ID of the IBM Cloud Internet Services instance.
    domainId String
    The ID of the domain to import the DNS records.
    file String
    The DNS zone file that contains the details of the DNS records.
    recordsAdded Number
    (String) The added records count from imported file.
    totalRecordsParsed Number
    (Integer) The parsed records count from imported file.

    Import

    The ibm_cis_dns_records_import resource can be imported by using the ID. The ID is formed from the zone file, the domain ID of the domain and the CRN (Cloud Resource Name) Concatenated using a : character with the prefix of 0:0:.

    The domain ID and CRN is located on the Overview page of the internet services instance under the domain heading of the console, or via by using the ibmcloud cis command line commands.

    • File is a string of the form: records.txt

    • Domain ID is a 32 digit character string of the form: 9caf68812ae9b3f0377fdf986751a78f

    • CRN is a 120 digit character string of the form: crn:v1:bluemix:public:internet-svcs:global:a/4ea1882a2d3401ed1e459979941966ea:31fa970d-51d0-4b05-893e-251cba75a7b3::

    Syntax

    $ pulumi import ibm:index/cisDnsRecordsImport:CisDnsRecordsImport myorgs <total_records_parsed>:<records_added>:<file>:<domain-id>:<crn>
    

    Example

    $ pulumi import ibm:index/cisDnsRecordsImport:CisDnsRecordsImport myorgs 0:0:records.txt:9caf68812ae9b3f0377fdf986751a78f:crn:v1:bluemix:public:internet-svcs:global:a/4ea1882a2d3401ed1e459979941966ea:31fa970d-51d0-4b05-893e-251cba75a7b3::
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud