Example Usage
Create ZoneRrset Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZoneRrset(name: string, args: ZoneRrsetArgs, opts?: CustomResourceOptions);@overload
def ZoneRrset(resource_name: str,
args: ZoneRrsetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZoneRrset(resource_name: str,
opts: Optional[ResourceOptions] = None,
records: Optional[Sequence[ZoneRrsetRecordArgs]] = None,
type: Optional[str] = None,
zone: Optional[str] = None,
change_protection: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
ttl: Optional[int] = None)func NewZoneRrset(ctx *Context, name string, args ZoneRrsetArgs, opts ...ResourceOption) (*ZoneRrset, error)public ZoneRrset(string name, ZoneRrsetArgs args, CustomResourceOptions? opts = null)
public ZoneRrset(String name, ZoneRrsetArgs args)
public ZoneRrset(String name, ZoneRrsetArgs args, CustomResourceOptions options)
type: hcloud:ZoneRrset
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 ZoneRrsetArgs
- 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 ZoneRrsetArgs
- 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 ZoneRrsetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZoneRrsetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZoneRrsetArgs
- 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 zoneRrsetResource = new HCloud.ZoneRrset("zoneRrsetResource", new()
{
Records = new[]
{
new HCloud.Inputs.ZoneRrsetRecordArgs
{
Value = "string",
Comment = "string",
},
},
Type = "string",
Zone = "string",
ChangeProtection = false,
Labels =
{
{ "string", "string" },
},
Name = "string",
Ttl = 0,
});
example, err := hcloud.NewZoneRrset(ctx, "zoneRrsetResource", &hcloud.ZoneRrsetArgs{
Records: hcloud.ZoneRrsetRecordArray{
&hcloud.ZoneRrsetRecordArgs{
Value: pulumi.String("string"),
Comment: pulumi.String("string"),
},
},
Type: pulumi.String("string"),
Zone: pulumi.String("string"),
ChangeProtection: pulumi.Bool(false),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Ttl: pulumi.Int(0),
})
var zoneRrsetResource = new ZoneRrset("zoneRrsetResource", ZoneRrsetArgs.builder()
.records(ZoneRrsetRecordArgs.builder()
.value("string")
.comment("string")
.build())
.type("string")
.zone("string")
.changeProtection(false)
.labels(Map.of("string", "string"))
.name("string")
.ttl(0)
.build());
zone_rrset_resource = hcloud.ZoneRrset("zoneRrsetResource",
records=[{
"value": "string",
"comment": "string",
}],
type="string",
zone="string",
change_protection=False,
labels={
"string": "string",
},
name="string",
ttl=0)
const zoneRrsetResource = new hcloud.ZoneRrset("zoneRrsetResource", {
records: [{
value: "string",
comment: "string",
}],
type: "string",
zone: "string",
changeProtection: false,
labels: {
string: "string",
},
name: "string",
ttl: 0,
});
type: hcloud:ZoneRrset
properties:
changeProtection: false
labels:
string: string
name: string
records:
- comment: string
value: string
ttl: 0
type: string
zone: string
ZoneRrset 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 ZoneRrset resource accepts the following input properties:
- Records
List<Pulumi.
HCloud. Inputs. Zone Rrset Record> - Records of the Zone RRSet.
- Type string
- Type of the Zone RRSet.
- Zone string
- ID or Name of the parent Zone.
- Change
Protection bool - Whether change protection is enabled.
- Labels Dictionary<string, string>
- User-defined labels (key-value pairs) for the resource.
- Name string
- Name of the Zone RRSet.
- Ttl int
- Time To Live (TTL) of the Zone RRSet.
- Records
[]Zone
Rrset Record Args - Records of the Zone RRSet.
- Type string
- Type of the Zone RRSet.
- Zone string
- ID or Name of the parent Zone.
- Change
Protection bool - Whether change protection is enabled.
- Labels map[string]string
- User-defined labels (key-value pairs) for the resource.
- Name string
- Name of the Zone RRSet.
- Ttl int
- Time To Live (TTL) of the Zone RRSet.
- records
List<Zone
Rrset Record> - Records of the Zone RRSet.
- type String
- Type of the Zone RRSet.
- zone String
- ID or Name of the parent Zone.
- change
Protection Boolean - Whether change protection is enabled.
- labels Map<String,String>
- User-defined labels (key-value pairs) for the resource.
- name String
- Name of the Zone RRSet.
- ttl Integer
- Time To Live (TTL) of the Zone RRSet.
- records
Zone
Rrset Record[] - Records of the Zone RRSet.
- type string
- Type of the Zone RRSet.
- zone string
- ID or Name of the parent Zone.
- change
Protection boolean - Whether change protection is enabled.
- labels {[key: string]: string}
- User-defined labels (key-value pairs) for the resource.
- name string
- Name of the Zone RRSet.
- ttl number
- Time To Live (TTL) of the Zone RRSet.
- records
Sequence[Zone
Rrset Record Args] - Records of the Zone RRSet.
- type str
- Type of the Zone RRSet.
- zone str
- ID or Name of the parent Zone.
- change_
protection bool - Whether change protection is enabled.
- labels Mapping[str, str]
- User-defined labels (key-value pairs) for the resource.
- name str
- Name of the Zone RRSet.
- ttl int
- Time To Live (TTL) of the Zone RRSet.
- records List<Property Map>
- Records of the Zone RRSet.
- type String
- Type of the Zone RRSet.
- zone String
- ID or Name of the parent Zone.
- change
Protection Boolean - Whether change protection is enabled.
- labels Map<String>
- User-defined labels (key-value pairs) for the resource.
- name String
- Name of the Zone RRSet.
- ttl Number
- Time To Live (TTL) of the Zone RRSet.
Outputs
All input properties are implicitly available as output properties. Additionally, the ZoneRrset 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 ZoneRrset Resource
Get an existing ZoneRrset 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?: ZoneRrsetState, opts?: CustomResourceOptions): ZoneRrset@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
change_protection: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
records: Optional[Sequence[ZoneRrsetRecordArgs]] = None,
ttl: Optional[int] = None,
type: Optional[str] = None,
zone: Optional[str] = None) -> ZoneRrsetfunc GetZoneRrset(ctx *Context, name string, id IDInput, state *ZoneRrsetState, opts ...ResourceOption) (*ZoneRrset, error)public static ZoneRrset Get(string name, Input<string> id, ZoneRrsetState? state, CustomResourceOptions? opts = null)public static ZoneRrset get(String name, Output<String> id, ZoneRrsetState state, CustomResourceOptions options)resources: _: type: hcloud:ZoneRrset 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.
- Change
Protection bool - Whether change protection is enabled.
- Labels Dictionary<string, string>
- User-defined labels (key-value pairs) for the resource.
- Name string
- Name of the Zone RRSet.
- Records
List<Pulumi.
HCloud. Inputs. Zone Rrset Record> - Records of the Zone RRSet.
- Ttl int
- Time To Live (TTL) of the Zone RRSet.
- Type string
- Type of the Zone RRSet.
- Zone string
- ID or Name of the parent Zone.
- Change
Protection bool - Whether change protection is enabled.
- Labels map[string]string
- User-defined labels (key-value pairs) for the resource.
- Name string
- Name of the Zone RRSet.
- Records
[]Zone
Rrset Record Args - Records of the Zone RRSet.
- Ttl int
- Time To Live (TTL) of the Zone RRSet.
- Type string
- Type of the Zone RRSet.
- Zone string
- ID or Name of the parent Zone.
- change
Protection Boolean - Whether change protection is enabled.
- labels Map<String,String>
- User-defined labels (key-value pairs) for the resource.
- name String
- Name of the Zone RRSet.
- records
List<Zone
Rrset Record> - Records of the Zone RRSet.
- ttl Integer
- Time To Live (TTL) of the Zone RRSet.
- type String
- Type of the Zone RRSet.
- zone String
- ID or Name of the parent Zone.
- change
Protection boolean - Whether change protection is enabled.
- labels {[key: string]: string}
- User-defined labels (key-value pairs) for the resource.
- name string
- Name of the Zone RRSet.
- records
Zone
Rrset Record[] - Records of the Zone RRSet.
- ttl number
- Time To Live (TTL) of the Zone RRSet.
- type string
- Type of the Zone RRSet.
- zone string
- ID or Name of the parent Zone.
- change_
protection bool - Whether change protection is enabled.
- labels Mapping[str, str]
- User-defined labels (key-value pairs) for the resource.
- name str
- Name of the Zone RRSet.
- records
Sequence[Zone
Rrset Record Args] - Records of the Zone RRSet.
- ttl int
- Time To Live (TTL) of the Zone RRSet.
- type str
- Type of the Zone RRSet.
- zone str
- ID or Name of the parent Zone.
- change
Protection Boolean - Whether change protection is enabled.
- labels Map<String>
- User-defined labels (key-value pairs) for the resource.
- name String
- Name of the Zone RRSet.
- records List<Property Map>
- Records of the Zone RRSet.
- ttl Number
- Time To Live (TTL) of the Zone RRSet.
- type String
- Type of the Zone RRSet.
- zone String
- ID or Name of the parent Zone.
Supporting Types
ZoneRrsetRecord, ZoneRrsetRecordArgs
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = hcloud_zone_rrset.example
id = “$ZONE_ID_OR_NAME/$RRSET_NAME/$RRSET_TYPE”
}
import {
to = hcloud_zone_rrset.example
id = “$ZONE_ID_OR_NAME/$RRSET_ID”
}
The pulumi import command can be used, for example:
$ pulumi import hcloud:index/zoneRrset:ZoneRrset example "$ZONE_ID_OR_NAME/$RRSET_NAME/$RRSET_TYPE"
$ pulumi import hcloud:index/zoneRrset:ZoneRrset example "$ZONE_ID_OR_NAME/$RRSET_ID"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloudTerraform Provider.
