1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. VirtualNetworkDnsServers

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.network.VirtualNetworkDnsServers

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.inputs.VirtualNetworkSubnetArgs;
    import com.pulumi.azure.network.VirtualNetworkDnsServers;
    import com.pulumi.azure.network.VirtualNetworkDnsServersArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
                .name("example-vnet")
                .addressSpaces("10.0.0.0/16")
                .location(example.location())
                .resourceGroupName(example.name())
                .subnets(VirtualNetworkSubnetArgs.builder()
                    .name("subnet1")
                    .addressPrefix("10.0.1.0/24")
                    .build())
                .build());
    
            var exampleVirtualNetworkDnsServers = new VirtualNetworkDnsServers("exampleVirtualNetworkDnsServers", VirtualNetworkDnsServersArgs.builder()
                .virtualNetworkId(exampleVirtualNetwork.id())
                .dnsServers(            
                    "10.7.7.2",
                    "10.7.7.7",
                    "10.7.7.1")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: example-vnet
          addressSpaces:
            - 10.0.0.0/16
          location: ${example.location}
          resourceGroupName: ${example.name}
          subnets:
            - name: subnet1
              addressPrefix: 10.0.1.0/24
      exampleVirtualNetworkDnsServers:
        type: azure:network:VirtualNetworkDnsServers
        name: example
        properties:
          virtualNetworkId: ${exampleVirtualNetwork.id}
          dnsServers:
            - 10.7.7.2
            - 10.7.7.7
            - 10.7.7.1
    

    Create VirtualNetworkDnsServers Resource

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

    Constructor syntax

    new VirtualNetworkDnsServers(name: string, args: VirtualNetworkDnsServersArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualNetworkDnsServers(resource_name: str,
                                 args: VirtualNetworkDnsServersArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualNetworkDnsServers(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 virtual_network_id: Optional[str] = None,
                                 dns_servers: Optional[Sequence[str]] = None)
    func NewVirtualNetworkDnsServers(ctx *Context, name string, args VirtualNetworkDnsServersArgs, opts ...ResourceOption) (*VirtualNetworkDnsServers, error)
    public VirtualNetworkDnsServers(string name, VirtualNetworkDnsServersArgs args, CustomResourceOptions? opts = null)
    public VirtualNetworkDnsServers(String name, VirtualNetworkDnsServersArgs args)
    public VirtualNetworkDnsServers(String name, VirtualNetworkDnsServersArgs args, CustomResourceOptions options)
    
    type: azure:network:VirtualNetworkDnsServers
    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 VirtualNetworkDnsServersArgs
    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 VirtualNetworkDnsServersArgs
    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 VirtualNetworkDnsServersArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VirtualNetworkDnsServersArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VirtualNetworkDnsServersArgs
    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 virtualNetworkDnsServersResource = new Azure.Network.VirtualNetworkDnsServers("virtualNetworkDnsServersResource", new()
    {
        VirtualNetworkId = "string",
        DnsServers = new[]
        {
            "string",
        },
    });
    
    example, err := network.NewVirtualNetworkDnsServers(ctx, "virtualNetworkDnsServersResource", &network.VirtualNetworkDnsServersArgs{
    	VirtualNetworkId: pulumi.String("string"),
    	DnsServers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var virtualNetworkDnsServersResource = new VirtualNetworkDnsServers("virtualNetworkDnsServersResource", VirtualNetworkDnsServersArgs.builder()
        .virtualNetworkId("string")
        .dnsServers("string")
        .build());
    
    virtual_network_dns_servers_resource = azure.network.VirtualNetworkDnsServers("virtualNetworkDnsServersResource",
        virtual_network_id="string",
        dns_servers=["string"])
    
    const virtualNetworkDnsServersResource = new azure.network.VirtualNetworkDnsServers("virtualNetworkDnsServersResource", {
        virtualNetworkId: "string",
        dnsServers: ["string"],
    });
    
    type: azure:network:VirtualNetworkDnsServers
    properties:
        dnsServers:
            - string
        virtualNetworkId: string
    

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

    VirtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    DnsServers List<string>
    List of IP addresses of DNS servers
    VirtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    DnsServers []string
    List of IP addresses of DNS servers
    virtualNetworkId String
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    dnsServers List<String>
    List of IP addresses of DNS servers
    virtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    dnsServers string[]
    List of IP addresses of DNS servers
    virtual_network_id str
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    dns_servers Sequence[str]
    List of IP addresses of DNS servers
    virtualNetworkId String
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    dnsServers List<String>
    List of IP addresses of DNS servers

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VirtualNetworkDnsServers Resource

    Get an existing VirtualNetworkDnsServers 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?: VirtualNetworkDnsServersState, opts?: CustomResourceOptions): VirtualNetworkDnsServers
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dns_servers: Optional[Sequence[str]] = None,
            virtual_network_id: Optional[str] = None) -> VirtualNetworkDnsServers
    func GetVirtualNetworkDnsServers(ctx *Context, name string, id IDInput, state *VirtualNetworkDnsServersState, opts ...ResourceOption) (*VirtualNetworkDnsServers, error)
    public static VirtualNetworkDnsServers Get(string name, Input<string> id, VirtualNetworkDnsServersState? state, CustomResourceOptions? opts = null)
    public static VirtualNetworkDnsServers get(String name, Output<String> id, VirtualNetworkDnsServersState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    DnsServers List<string>
    List of IP addresses of DNS servers
    VirtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    DnsServers []string
    List of IP addresses of DNS servers
    VirtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    dnsServers List<String>
    List of IP addresses of DNS servers
    virtualNetworkId String
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    dnsServers string[]
    List of IP addresses of DNS servers
    virtualNetworkId string
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    dns_servers Sequence[str]
    List of IP addresses of DNS servers
    virtual_network_id str
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
    dnsServers List<String>
    List of IP addresses of DNS servers
    virtualNetworkId String
    The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.

    Import

    Virtual Network DNS Servers can be imported using the resource id, e.g.

    $ pulumi import azure:network/virtualNetworkDnsServers:VirtualNetworkDnsServers exampleNetwork /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/dnsServers/default
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi