ibm.CisDnsRecordsImport
Explore with Pulumi AI
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:
- Cis
Id string - The ID of the IBM Cloud Internet Services instance.
- Domain
Id 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.
- Cis
Dns stringRecords Import Id - (String) The record ID. It is a combination of
<total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id>
attributes concatenated with:
.
- Cis
Id string - The ID of the IBM Cloud Internet Services instance.
- Domain
Id 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.
- Cis
Dns stringRecords Import Id - (String) The record ID. It is a combination of
<total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id>
attributes concatenated with:
.
- cis
Id String - The ID of the IBM Cloud Internet Services instance.
- domain
Id 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.
- cis
Dns StringRecords Import Id - (String) The record ID. It is a combination of
<total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id>
attributes concatenated with:
.
- cis
Id string - The ID of the IBM Cloud Internet Services instance.
- domain
Id 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.
- cis
Dns stringRecords Import Id - (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_ strrecords_ import_ id - (String) The record ID. It is a combination of
<total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id>
attributes concatenated with:
.
- cis
Id String - The ID of the IBM Cloud Internet Services instance.
- domain
Id 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.
- cis
Dns StringRecords Import Id - (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.
- Records
Added double - (String) The added records count from imported file.
- Total
Records doubleParsed - (Integer) The parsed records count from imported file.
- Id string
- The provider-assigned unique ID for this managed resource.
- Records
Added float64 - (String) The added records count from imported file.
- Total
Records float64Parsed - (Integer) The parsed records count from imported file.
- id String
- The provider-assigned unique ID for this managed resource.
- records
Added Double - (String) The added records count from imported file.
- total
Records DoubleParsed - (Integer) The parsed records count from imported file.
- id string
- The provider-assigned unique ID for this managed resource.
- records
Added number - (String) The added records count from imported file.
- total
Records numberParsed - (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_ floatparsed - (Integer) The parsed records count from imported file.
- id String
- The provider-assigned unique ID for this managed resource.
- records
Added Number - (String) The added records count from imported file.
- total
Records NumberParsed - (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.
- Cis
Dns stringRecords Import Id - (String) The record ID. It is a combination of
<total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id>
attributes concatenated with:
. - Cis
Id string - The ID of the IBM Cloud Internet Services instance.
- Domain
Id 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.
- Records
Added double - (String) The added records count from imported file.
- Total
Records doubleParsed - (Integer) The parsed records count from imported file.
- Cis
Dns stringRecords Import Id - (String) The record ID. It is a combination of
<total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id>
attributes concatenated with:
. - Cis
Id string - The ID of the IBM Cloud Internet Services instance.
- Domain
Id 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.
- Records
Added float64 - (String) The added records count from imported file.
- Total
Records float64Parsed - (Integer) The parsed records count from imported file.
- cis
Dns StringRecords Import Id - (String) The record ID. It is a combination of
<total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id>
attributes concatenated with:
. - cis
Id String - The ID of the IBM Cloud Internet Services instance.
- domain
Id 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.
- records
Added Double - (String) The added records count from imported file.
- total
Records DoubleParsed - (Integer) The parsed records count from imported file.
- cis
Dns stringRecords Import Id - (String) The record ID. It is a combination of
<total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id>
attributes concatenated with:
. - cis
Id string - The ID of the IBM Cloud Internet Services instance.
- domain
Id 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.
- records
Added number - (String) The added records count from imported file.
- total
Records numberParsed - (Integer) The parsed records count from imported file.
- cis_
dns_ strrecords_ import_ id - (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_ floatparsed - (Integer) The parsed records count from imported file.
- cis
Dns StringRecords Import Id - (String) The record ID. It is a combination of
<total_records_parsed>:<records_added>:<file>:<domain_id>:<cis_id>
attributes concatenated with:
. - cis
Id String - The ID of the IBM Cloud Internet Services instance.
- domain
Id 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.
- records
Added Number - (String) The added records count from imported file.
- total
Records NumberParsed - (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.