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

ibm.DnsPermittedNetwork

Explore with Pulumi AI

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

    Create or delete a DNS permitted network. For more information, see Managing permitted networks.

    You can add a VPC as a permitted network to a DNS entry only.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const test_pdns_permitted_network_nw = new ibm.DnsPermittedNetwork("test-pdns-permitted-network-nw", {
        instanceId: ibm_resource_instance["test-pdns-instance"].guid,
        zoneId: ibm_dns_zone["test-pdns-zone"].zone_id,
        vpcCrn: ibm_is_vpc.test_pdns_vpc.crn,
        type: "vpc",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test_pdns_permitted_network_nw = ibm.DnsPermittedNetwork("test-pdns-permitted-network-nw",
        instance_id=ibm_resource_instance["test-pdns-instance"]["guid"],
        zone_id=ibm_dns_zone["test-pdns-zone"]["zone_id"],
        vpc_crn=ibm_is_vpc["test_pdns_vpc"]["crn"],
        type="vpc")
    
    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 {
    		_, err := ibm.NewDnsPermittedNetwork(ctx, "test-pdns-permitted-network-nw", &ibm.DnsPermittedNetworkArgs{
    			InstanceId: pulumi.Any(ibm_resource_instance.TestPdnsInstance.Guid),
    			ZoneId:     pulumi.Any(ibm_dns_zone.TestPdnsZone.Zone_id),
    			VpcCrn:     pulumi.Any(ibm_is_vpc.Test_pdns_vpc.Crn),
    			Type:       pulumi.String("vpc"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var test_pdns_permitted_network_nw = new Ibm.DnsPermittedNetwork("test-pdns-permitted-network-nw", new()
        {
            InstanceId = ibm_resource_instance.Test_pdns_instance.Guid,
            ZoneId = ibm_dns_zone.Test_pdns_zone.Zone_id,
            VpcCrn = ibm_is_vpc.Test_pdns_vpc.Crn,
            Type = "vpc",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.DnsPermittedNetwork;
    import com.pulumi.ibm.DnsPermittedNetworkArgs;
    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 test_pdns_permitted_network_nw = new DnsPermittedNetwork("test-pdns-permitted-network-nw", DnsPermittedNetworkArgs.builder()
                .instanceId(ibm_resource_instance.test-pdns-instance().guid())
                .zoneId(ibm_dns_zone.test-pdns-zone().zone_id())
                .vpcCrn(ibm_is_vpc.test_pdns_vpc().crn())
                .type("vpc")
                .build());
    
        }
    }
    
    resources:
      test-pdns-permitted-network-nw:
        type: ibm:DnsPermittedNetwork
        properties:
          instanceId: ${ibm_resource_instance"test-pdns-instance"[%!s(MISSING)].guid}
          zoneId: ${ibm_dns_zone"test-pdns-zone"[%!s(MISSING)].zone_id}
          vpcCrn: ${ibm_is_vpc.test_pdns_vpc.crn}
          type: vpc
    

    Create DnsPermittedNetwork Resource

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

    Constructor syntax

    new DnsPermittedNetwork(name: string, args: DnsPermittedNetworkArgs, opts?: CustomResourceOptions);
    @overload
    def DnsPermittedNetwork(resource_name: str,
                            args: DnsPermittedNetworkArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def DnsPermittedNetwork(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            instance_id: Optional[str] = None,
                            vpc_crn: Optional[str] = None,
                            zone_id: Optional[str] = None,
                            dns_permitted_network_id: Optional[str] = None,
                            timeouts: Optional[DnsPermittedNetworkTimeoutsArgs] = None,
                            type: Optional[str] = None)
    func NewDnsPermittedNetwork(ctx *Context, name string, args DnsPermittedNetworkArgs, opts ...ResourceOption) (*DnsPermittedNetwork, error)
    public DnsPermittedNetwork(string name, DnsPermittedNetworkArgs args, CustomResourceOptions? opts = null)
    public DnsPermittedNetwork(String name, DnsPermittedNetworkArgs args)
    public DnsPermittedNetwork(String name, DnsPermittedNetworkArgs args, CustomResourceOptions options)
    
    type: ibm:DnsPermittedNetwork
    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 DnsPermittedNetworkArgs
    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 DnsPermittedNetworkArgs
    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 DnsPermittedNetworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DnsPermittedNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DnsPermittedNetworkArgs
    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 dnsPermittedNetworkResource = new Ibm.DnsPermittedNetwork("dnsPermittedNetworkResource", new()
    {
        InstanceId = "string",
        VpcCrn = "string",
        ZoneId = "string",
        DnsPermittedNetworkId = "string",
        Timeouts = new Ibm.Inputs.DnsPermittedNetworkTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        Type = "string",
    });
    
    example, err := ibm.NewDnsPermittedNetwork(ctx, "dnsPermittedNetworkResource", &ibm.DnsPermittedNetworkArgs{
    	InstanceId:            pulumi.String("string"),
    	VpcCrn:                pulumi.String("string"),
    	ZoneId:                pulumi.String("string"),
    	DnsPermittedNetworkId: pulumi.String("string"),
    	Timeouts: &ibm.DnsPermittedNetworkTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    })
    
    var dnsPermittedNetworkResource = new DnsPermittedNetwork("dnsPermittedNetworkResource", DnsPermittedNetworkArgs.builder()
        .instanceId("string")
        .vpcCrn("string")
        .zoneId("string")
        .dnsPermittedNetworkId("string")
        .timeouts(DnsPermittedNetworkTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .type("string")
        .build());
    
    dns_permitted_network_resource = ibm.DnsPermittedNetwork("dnsPermittedNetworkResource",
        instance_id="string",
        vpc_crn="string",
        zone_id="string",
        dns_permitted_network_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
        },
        type="string")
    
    const dnsPermittedNetworkResource = new ibm.DnsPermittedNetwork("dnsPermittedNetworkResource", {
        instanceId: "string",
        vpcCrn: "string",
        zoneId: "string",
        dnsPermittedNetworkId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
        type: "string",
    });
    
    type: ibm:DnsPermittedNetwork
    properties:
        dnsPermittedNetworkId: string
        instanceId: string
        timeouts:
            create: string
            delete: string
        type: string
        vpcCrn: string
        zoneId: string
    

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

    InstanceId string
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    VpcCrn string
    The CRN of the VPC that you want to add as a permitted network.
    ZoneId string
    The ID of the private DNS zone where you want to add the permitted network.
    DnsPermittedNetworkId string
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    Timeouts DnsPermittedNetworkTimeouts
    Type string
    The type of permitted network that you want to add. Supported values are vpc.
    InstanceId string
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    VpcCrn string
    The CRN of the VPC that you want to add as a permitted network.
    ZoneId string
    The ID of the private DNS zone where you want to add the permitted network.
    DnsPermittedNetworkId string
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    Timeouts DnsPermittedNetworkTimeoutsArgs
    Type string
    The type of permitted network that you want to add. Supported values are vpc.
    instanceId String
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    vpcCrn String
    The CRN of the VPC that you want to add as a permitted network.
    zoneId String
    The ID of the private DNS zone where you want to add the permitted network.
    dnsPermittedNetworkId String
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    timeouts DnsPermittedNetworkTimeouts
    type String
    The type of permitted network that you want to add. Supported values are vpc.
    instanceId string
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    vpcCrn string
    The CRN of the VPC that you want to add as a permitted network.
    zoneId string
    The ID of the private DNS zone where you want to add the permitted network.
    dnsPermittedNetworkId string
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    timeouts DnsPermittedNetworkTimeouts
    type string
    The type of permitted network that you want to add. Supported values are vpc.
    instance_id str
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    vpc_crn str
    The CRN of the VPC that you want to add as a permitted network.
    zone_id str
    The ID of the private DNS zone where you want to add the permitted network.
    dns_permitted_network_id str
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    timeouts DnsPermittedNetworkTimeoutsArgs
    type str
    The type of permitted network that you want to add. Supported values are vpc.
    instanceId String
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    vpcCrn String
    The CRN of the VPC that you want to add as a permitted network.
    zoneId String
    The ID of the private DNS zone where you want to add the permitted network.
    dnsPermittedNetworkId String
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    timeouts Property Map
    type String
    The type of permitted network that you want to add. Supported values are vpc.

    Outputs

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

    CreatedOn string
    (Timestamp) The time when the permitted network was added to the DNS.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    (Timestamp) The time when the permitted network was modified.
    PermittedNetworkId string
    Network Id
    State string
    Network status
    CreatedOn string
    (Timestamp) The time when the permitted network was added to the DNS.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    (Timestamp) The time when the permitted network was modified.
    PermittedNetworkId string
    Network Id
    State string
    Network status
    createdOn String
    (Timestamp) The time when the permitted network was added to the DNS.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    (Timestamp) The time when the permitted network was modified.
    permittedNetworkId String
    Network Id
    state String
    Network status
    createdOn string
    (Timestamp) The time when the permitted network was added to the DNS.
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedOn string
    (Timestamp) The time when the permitted network was modified.
    permittedNetworkId string
    Network Id
    state string
    Network status
    created_on str
    (Timestamp) The time when the permitted network was added to the DNS.
    id str
    The provider-assigned unique ID for this managed resource.
    modified_on str
    (Timestamp) The time when the permitted network was modified.
    permitted_network_id str
    Network Id
    state str
    Network status
    createdOn String
    (Timestamp) The time when the permitted network was added to the DNS.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    (Timestamp) The time when the permitted network was modified.
    permittedNetworkId String
    Network Id
    state String
    Network status

    Look up Existing DnsPermittedNetwork Resource

    Get an existing DnsPermittedNetwork 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?: DnsPermittedNetworkState, opts?: CustomResourceOptions): DnsPermittedNetwork
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_on: Optional[str] = None,
            dns_permitted_network_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            modified_on: Optional[str] = None,
            permitted_network_id: Optional[str] = None,
            state: Optional[str] = None,
            timeouts: Optional[DnsPermittedNetworkTimeoutsArgs] = None,
            type: Optional[str] = None,
            vpc_crn: Optional[str] = None,
            zone_id: Optional[str] = None) -> DnsPermittedNetwork
    func GetDnsPermittedNetwork(ctx *Context, name string, id IDInput, state *DnsPermittedNetworkState, opts ...ResourceOption) (*DnsPermittedNetwork, error)
    public static DnsPermittedNetwork Get(string name, Input<string> id, DnsPermittedNetworkState? state, CustomResourceOptions? opts = null)
    public static DnsPermittedNetwork get(String name, Output<String> id, DnsPermittedNetworkState state, CustomResourceOptions options)
    resources:  _:    type: ibm:DnsPermittedNetwork    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:
    CreatedOn string
    (Timestamp) The time when the permitted network was added to the DNS.
    DnsPermittedNetworkId string
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    InstanceId string
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    ModifiedOn string
    (Timestamp) The time when the permitted network was modified.
    PermittedNetworkId string
    Network Id
    State string
    Network status
    Timeouts DnsPermittedNetworkTimeouts
    Type string
    The type of permitted network that you want to add. Supported values are vpc.
    VpcCrn string
    The CRN of the VPC that you want to add as a permitted network.
    ZoneId string
    The ID of the private DNS zone where you want to add the permitted network.
    CreatedOn string
    (Timestamp) The time when the permitted network was added to the DNS.
    DnsPermittedNetworkId string
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    InstanceId string
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    ModifiedOn string
    (Timestamp) The time when the permitted network was modified.
    PermittedNetworkId string
    Network Id
    State string
    Network status
    Timeouts DnsPermittedNetworkTimeoutsArgs
    Type string
    The type of permitted network that you want to add. Supported values are vpc.
    VpcCrn string
    The CRN of the VPC that you want to add as a permitted network.
    ZoneId string
    The ID of the private DNS zone where you want to add the permitted network.
    createdOn String
    (Timestamp) The time when the permitted network was added to the DNS.
    dnsPermittedNetworkId String
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    instanceId String
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    modifiedOn String
    (Timestamp) The time when the permitted network was modified.
    permittedNetworkId String
    Network Id
    state String
    Network status
    timeouts DnsPermittedNetworkTimeouts
    type String
    The type of permitted network that you want to add. Supported values are vpc.
    vpcCrn String
    The CRN of the VPC that you want to add as a permitted network.
    zoneId String
    The ID of the private DNS zone where you want to add the permitted network.
    createdOn string
    (Timestamp) The time when the permitted network was added to the DNS.
    dnsPermittedNetworkId string
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    instanceId string
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    modifiedOn string
    (Timestamp) The time when the permitted network was modified.
    permittedNetworkId string
    Network Id
    state string
    Network status
    timeouts DnsPermittedNetworkTimeouts
    type string
    The type of permitted network that you want to add. Supported values are vpc.
    vpcCrn string
    The CRN of the VPC that you want to add as a permitted network.
    zoneId string
    The ID of the private DNS zone where you want to add the permitted network.
    created_on str
    (Timestamp) The time when the permitted network was added to the DNS.
    dns_permitted_network_id str
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    instance_id str
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    modified_on str
    (Timestamp) The time when the permitted network was modified.
    permitted_network_id str
    Network Id
    state str
    Network status
    timeouts DnsPermittedNetworkTimeoutsArgs
    type str
    The type of permitted network that you want to add. Supported values are vpc.
    vpc_crn str
    The CRN of the VPC that you want to add as a permitted network.
    zone_id str
    The ID of the private DNS zone where you want to add the permitted network.
    createdOn String
    (Timestamp) The time when the permitted network was added to the DNS.
    dnsPermittedNetworkId String
    (String) The unique identifier of the DNS private network. The ID is composed of <instance_ID>/<zone_ID>/<permitted_network_ID>.
    instanceId String
    The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
    modifiedOn String
    (Timestamp) The time when the permitted network was modified.
    permittedNetworkId String
    Network Id
    state String
    Network status
    timeouts Property Map
    type String
    The type of permitted network that you want to add. Supported values are vpc.
    vpcCrn String
    The CRN of the VPC that you want to add as a permitted network.
    zoneId String
    The ID of the private DNS zone where you want to add the permitted network.

    Supporting Types

    DnsPermittedNetworkTimeouts, DnsPermittedNetworkTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    The ibm_dns_permitted_network can be imported by using private DNS instance ID, zone ID and permitted network ID.

    Example

    $ pulumi import ibm:index/dnsPermittedNetwork:DnsPermittedNetwork example 6ffda12064634723b079acdb018ef308/5ffda12064634723b079acdb018ef308/435da12064634723b079acdb018ef308
    

    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