Private Zone
Describes a Private DNS zone. Uses Azure REST API version 2024-06-01. Other available API versions: 2018-09-01, 2020-01-01, 2020-06-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native privatedns [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
PUT Private DNS Zone
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var privateZone = new AzureNative.PrivateDns.PrivateZone("privateZone", new()
{
Location = "Global",
PrivateZoneName = "privatezone1.com",
ResourceGroupName = "resourceGroup1",
Tags =
{
{ "key1", "value1" },
},
});
});
package main
import (
privatedns "github.com/pulumi/pulumi-azure-native-sdk/privatedns/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := privatedns.NewPrivateZone(ctx, "privateZone", &privatedns.PrivateZoneArgs{
Location: pulumi.String("Global"),
PrivateZoneName: pulumi.String("privatezone1.com"),
ResourceGroupName: pulumi.String("resourceGroup1"),
Tags: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.privatedns.PrivateZone;
import com.pulumi.azurenative.privatedns.PrivateZoneArgs;
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 privateZone = new PrivateZone("privateZone", PrivateZoneArgs.builder()
.location("Global")
.privateZoneName("privatezone1.com")
.resourceGroupName("resourceGroup1")
.tags(Map.of("key1", "value1"))
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:privatedns:PrivateZone privatezone1.com /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}
Properties
The Azure API version of the resource.
Private zone internal Id
The maximum number of record sets that can be created in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored.
The maximum number of virtual networks that can be linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored.
The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored.
The current number of record sets in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored.
The current number of virtual networks that are linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored.
The current number of virtual networks that are linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored.
The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.