ionoscloud.dns.Zone
Explore with Pulumi AI
Manages a DNS Zone.
⚠️ Only tokens are accepted for authorization in the ionoscloud_dns_zone resource. Please ensure you are using tokens as other methods will not be valid.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = new ionoscloud.dns.Zone("example", {
name: "example.com",
description: "description",
enabled: false,
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.dns.Zone("example",
name="example.com",
description="description",
enabled=False)
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{
Name: pulumi.String("example.com"),
Description: pulumi.String("description"),
Enabled: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.Dns.Zone("example", new()
{
Name = "example.com",
Description = "description",
Enabled = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.dns.Zone;
import com.pulumi.ionoscloud.dns.ZoneArgs;
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 Zone("example", ZoneArgs.builder()
.name("example.com")
.description("description")
.enabled(false)
.build());
}
}
resources:
example:
type: ionoscloud:dns:Zone
properties:
name: example.com
description: description
enabled: false
Create Zone Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Zone(name: string, args?: ZoneArgs, opts?: CustomResourceOptions);
@overload
def Zone(resource_name: str,
args: Optional[ZoneArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Zone(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None)
func NewZone(ctx *Context, name string, args *ZoneArgs, opts ...ResourceOption) (*Zone, error)
public Zone(string name, ZoneArgs? args = null, CustomResourceOptions? opts = null)
type: ionoscloud:dns:Zone
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 ZoneArgs
- 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 ZoneArgs
- 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 ZoneArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZoneArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZoneArgs
- 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 zoneResource = new Ionoscloud.Dns.Zone("zoneResource", new()
{
Description = "string",
Enabled = false,
Name = "string",
});
example, err := dns.NewZone(ctx, "zoneResource", &dns.ZoneArgs{
Description: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
})
var zoneResource = new Zone("zoneResource", ZoneArgs.builder()
.description("string")
.enabled(false)
.name("string")
.build());
zone_resource = ionoscloud.dns.Zone("zoneResource",
description="string",
enabled=False,
name="string")
const zoneResource = new ionoscloud.dns.Zone("zoneResource", {
description: "string",
enabled: false,
name: "string",
});
type: ionoscloud:dns:Zone
properties:
description: string
enabled: false
name: string
Zone 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 Zone resource accepts the following input properties:
- Description string
- [string] The description for the DNS Zone.
- Enabled bool
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - Name string
- [string] The name of the DNS Zone.
- Description string
- [string] The description for the DNS Zone.
- Enabled bool
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - Name string
- [string] The name of the DNS Zone.
- description String
- [string] The description for the DNS Zone.
- enabled Boolean
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - name String
- [string] The name of the DNS Zone.
- description string
- [string] The description for the DNS Zone.
- enabled boolean
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - name string
- [string] The name of the DNS Zone.
- description str
- [string] The description for the DNS Zone.
- enabled bool
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - name str
- [string] The name of the DNS Zone.
- description String
- [string] The description for the DNS Zone.
- enabled Boolean
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - name String
- [string] The name of the DNS Zone.
Outputs
All input properties are implicitly available as output properties. Additionally, the Zone resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Nameservers List<string>
- A list of available name servers.
- Id string
- The provider-assigned unique ID for this managed resource.
- Nameservers []string
- A list of available name servers.
- id String
- The provider-assigned unique ID for this managed resource.
- nameservers List<String>
- A list of available name servers.
- id string
- The provider-assigned unique ID for this managed resource.
- nameservers string[]
- A list of available name servers.
- id str
- The provider-assigned unique ID for this managed resource.
- nameservers Sequence[str]
- A list of available name servers.
- id String
- The provider-assigned unique ID for this managed resource.
- nameservers List<String>
- A list of available name servers.
Look up Existing Zone Resource
Get an existing Zone 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?: ZoneState, opts?: CustomResourceOptions): Zone
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
nameservers: Optional[Sequence[str]] = None) -> Zone
func GetZone(ctx *Context, name string, id IDInput, state *ZoneState, opts ...ResourceOption) (*Zone, error)
public static Zone Get(string name, Input<string> id, ZoneState? state, CustomResourceOptions? opts = null)
public static Zone get(String name, Output<String> id, ZoneState state, CustomResourceOptions options)
resources: _: type: ionoscloud:dns:Zone 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.
- Description string
- [string] The description for the DNS Zone.
- Enabled bool
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - Name string
- [string] The name of the DNS Zone.
- Nameservers List<string>
- A list of available name servers.
- Description string
- [string] The description for the DNS Zone.
- Enabled bool
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - Name string
- [string] The name of the DNS Zone.
- Nameservers []string
- A list of available name servers.
- description String
- [string] The description for the DNS Zone.
- enabled Boolean
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - name String
- [string] The name of the DNS Zone.
- nameservers List<String>
- A list of available name servers.
- description string
- [string] The description for the DNS Zone.
- enabled boolean
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - name string
- [string] The name of the DNS Zone.
- nameservers string[]
- A list of available name servers.
- description str
- [string] The description for the DNS Zone.
- enabled bool
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - name str
- [string] The name of the DNS Zone.
- nameservers Sequence[str]
- A list of available name servers.
- description String
- [string] The description for the DNS Zone.
- enabled Boolean
- [bool] Indicates if the DNS Zone is active or not. Default is
true
. - name String
- [string] The name of the DNS Zone.
- nameservers List<String>
- A list of available name servers.
Import
In order to import a DNS Zone, you can define an empty DNS Zone resource in the plan:
hcl
resource “ionoscloud_dns_zone” “example” {
}
The resource can be imported using the zone_id
, for example:
$ pulumi import ionoscloud:dns/zone:Zone examplezone_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.