ibm.DnsPermittedNetwork
Explore with Pulumi AI
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:
- Instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- Vpc
Crn string - The CRN of the VPC that you want to add as a permitted network.
- Zone
Id string - The ID of the private DNS zone where you want to add the permitted network.
- Dns
Permitted stringNetwork Id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - Timeouts
Dns
Permitted Network Timeouts - Type string
- The type of permitted network that you want to add. Supported values are
vpc
.
- Instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- Vpc
Crn string - The CRN of the VPC that you want to add as a permitted network.
- Zone
Id string - The ID of the private DNS zone where you want to add the permitted network.
- Dns
Permitted stringNetwork Id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - Timeouts
Dns
Permitted Network Timeouts Args - Type string
- The type of permitted network that you want to add. Supported values are
vpc
.
- instance
Id String - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- vpc
Crn String - The CRN of the VPC that you want to add as a permitted network.
- zone
Id String - The ID of the private DNS zone where you want to add the permitted network.
- dns
Permitted StringNetwork Id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - timeouts
Dns
Permitted Network Timeouts - type String
- The type of permitted network that you want to add. Supported values are
vpc
.
- instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- vpc
Crn string - The CRN of the VPC that you want to add as a permitted network.
- zone
Id string - The ID of the private DNS zone where you want to add the permitted network.
- dns
Permitted stringNetwork Id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - timeouts
Dns
Permitted Network Timeouts - 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_ strnetwork_ id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - timeouts
Dns
Permitted Network Timeouts Args - type str
- The type of permitted network that you want to add. Supported values are
vpc
.
- instance
Id String - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- vpc
Crn String - The CRN of the VPC that you want to add as a permitted network.
- zone
Id String - The ID of the private DNS zone where you want to add the permitted network.
- dns
Permitted StringNetwork Id - (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:
- Created
On string - (Timestamp) The time when the permitted network was added to the DNS.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - (Timestamp) The time when the permitted network was modified.
- Permitted
Network stringId - Network Id
- State string
- Network status
- Created
On string - (Timestamp) The time when the permitted network was added to the DNS.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - (Timestamp) The time when the permitted network was modified.
- Permitted
Network stringId - Network Id
- State string
- Network status
- created
On String - (Timestamp) The time when the permitted network was added to the DNS.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - (Timestamp) The time when the permitted network was modified.
- permitted
Network StringId - Network Id
- state String
- Network status
- created
On string - (Timestamp) The time when the permitted network was added to the DNS.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
On string - (Timestamp) The time when the permitted network was modified.
- permitted
Network stringId - 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_ strid - Network Id
- state str
- Network status
- created
On String - (Timestamp) The time when the permitted network was added to the DNS.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - (Timestamp) The time when the permitted network was modified.
- permitted
Network StringId - 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.
- Created
On string - (Timestamp) The time when the permitted network was added to the DNS.
- Dns
Permitted stringNetwork Id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - Instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- Modified
On string - (Timestamp) The time when the permitted network was modified.
- Permitted
Network stringId - Network Id
- State string
- Network status
- Timeouts
Dns
Permitted Network Timeouts - Type string
- The type of permitted network that you want to add. Supported values are
vpc
. - Vpc
Crn string - The CRN of the VPC that you want to add as a permitted network.
- Zone
Id string - The ID of the private DNS zone where you want to add the permitted network.
- Created
On string - (Timestamp) The time when the permitted network was added to the DNS.
- Dns
Permitted stringNetwork Id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - Instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- Modified
On string - (Timestamp) The time when the permitted network was modified.
- Permitted
Network stringId - Network Id
- State string
- Network status
- Timeouts
Dns
Permitted Network Timeouts Args - Type string
- The type of permitted network that you want to add. Supported values are
vpc
. - Vpc
Crn string - The CRN of the VPC that you want to add as a permitted network.
- Zone
Id string - The ID of the private DNS zone where you want to add the permitted network.
- created
On String - (Timestamp) The time when the permitted network was added to the DNS.
- dns
Permitted StringNetwork Id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - instance
Id String - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- modified
On String - (Timestamp) The time when the permitted network was modified.
- permitted
Network StringId - Network Id
- state String
- Network status
- timeouts
Dns
Permitted Network Timeouts - type String
- The type of permitted network that you want to add. Supported values are
vpc
. - vpc
Crn String - The CRN of the VPC that you want to add as a permitted network.
- zone
Id String - The ID of the private DNS zone where you want to add the permitted network.
- created
On string - (Timestamp) The time when the permitted network was added to the DNS.
- dns
Permitted stringNetwork Id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - instance
Id string - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- modified
On string - (Timestamp) The time when the permitted network was modified.
- permitted
Network stringId - Network Id
- state string
- Network status
- timeouts
Dns
Permitted Network Timeouts - type string
- The type of permitted network that you want to add. Supported values are
vpc
. - vpc
Crn string - The CRN of the VPC that you want to add as a permitted network.
- zone
Id 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_ strnetwork_ id - (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_ strid - Network Id
- state str
- Network status
- timeouts
Dns
Permitted Network Timeouts Args - 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.
- created
On String - (Timestamp) The time when the permitted network was added to the DNS.
- dns
Permitted StringNetwork Id - (String) The unique identifier of the DNS private network. The ID is composed of
<instance_ID>/<zone_ID>/<permitted_network_ID>
. - instance
Id String - The GUID of the IBM Cloud DNS service instance where you want to add a permitted network.
- modified
On String - (Timestamp) The time when the permitted network was modified.
- permitted
Network StringId - 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
. - vpc
Crn String - The CRN of the VPC that you want to add as a permitted network.
- zone
Id String - The ID of the private DNS zone where you want to add the permitted network.
Supporting Types
DnsPermittedNetworkTimeouts, DnsPermittedNetworkTimeoutsArgs
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.