Ovh

v0.0.4 published on Saturday, Sep 17, 2022 by lbrlabs

DomainZoneRecord

Provides a OVH domain zone record.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Lbrlabs.PulumiPackage.Ovh;

return await Deployment.RunAsync(() => 
{
    // Add a record to a sub-domain
    var test = new Ovh.DomainZoneRecord("test", new()
    {
        Fieldtype = "A",
        Subdomain = "test",
        Target = "0.0.0.0",
        Ttl = 3600,
        Zone = "testdemo.ovh",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ovh.NewDomainZoneRecord(ctx, "test", &ovh.DomainZoneRecordArgs{
			Fieldtype: pulumi.String("A"),
			Subdomain: pulumi.String("test"),
			Target:    pulumi.String("0.0.0.0"),
			Ttl:       pulumi.Int(3600),
			Zone:      pulumi.String("testdemo.ovh"),
		})
		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.ovh.DomainZoneRecord;
import com.pulumi.ovh.DomainZoneRecordArgs;
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 = new DomainZoneRecord("test", DomainZoneRecordArgs.builder()        
            .fieldtype("A")
            .subdomain("test")
            .target("0.0.0.0")
            .ttl("3600")
            .zone("testdemo.ovh")
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_ovh as ovh

# Add a record to a sub-domain
test = ovh.DomainZoneRecord("test",
    fieldtype="A",
    subdomain="test",
    target="0.0.0.0",
    ttl=3600,
    zone="testdemo.ovh")
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

// Add a record to a sub-domain
const test = new ovh.DomainZoneRecord("test", {
    fieldtype: "A",
    subdomain: "test",
    target: "0.0.0.0",
    ttl: 3600,
    zone: "testdemo.ovh",
});
resources:
  # Add a record to a sub-domain
  test:
    type: ovh:DomainZoneRecord
    properties:
      fieldtype: A
      subdomain: test
      target: 0.0.0.0
      ttl: 3600
      zone: testdemo.ovh

Create a DomainZoneRecord Resource

new DomainZoneRecord(name: string, args: DomainZoneRecordArgs, opts?: CustomResourceOptions);
@overload
def DomainZoneRecord(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     fieldtype: Optional[str] = None,
                     subdomain: Optional[str] = None,
                     target: Optional[str] = None,
                     ttl: Optional[int] = None,
                     zone: Optional[str] = None)
@overload
def DomainZoneRecord(resource_name: str,
                     args: DomainZoneRecordArgs,
                     opts: Optional[ResourceOptions] = None)
func NewDomainZoneRecord(ctx *Context, name string, args DomainZoneRecordArgs, opts ...ResourceOption) (*DomainZoneRecord, error)
public DomainZoneRecord(string name, DomainZoneRecordArgs args, CustomResourceOptions? opts = null)
public DomainZoneRecord(String name, DomainZoneRecordArgs args)
public DomainZoneRecord(String name, DomainZoneRecordArgs args, CustomResourceOptions options)
type: ovh:DomainZoneRecord
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DomainZoneRecordArgs
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 DomainZoneRecordArgs
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 DomainZoneRecordArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainZoneRecordArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DomainZoneRecordArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DomainZoneRecord Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DomainZoneRecord resource accepts the following input properties:

Fieldtype string

The type of the record

Target string

The value of the record

Zone string

The domain to add the record to

Subdomain string

The name of the record

Ttl int

The TTL of the record

Fieldtype string

The type of the record

Target string

The value of the record

Zone string

The domain to add the record to

Subdomain string

The name of the record

Ttl int

The TTL of the record

fieldtype String

The type of the record

target String

The value of the record

zone String

The domain to add the record to

subdomain String

The name of the record

ttl Integer

The TTL of the record

fieldtype string

The type of the record

target string

The value of the record

zone string

The domain to add the record to

subdomain string

The name of the record

ttl number

The TTL of the record

fieldtype str

The type of the record

target str

The value of the record

zone str

The domain to add the record to

subdomain str

The name of the record

ttl int

The TTL of the record

fieldtype String

The type of the record

target String

The value of the record

zone String

The domain to add the record to

subdomain String

The name of the record

ttl Number

The TTL of the record

Outputs

All input properties are implicitly available as output properties. Additionally, the DomainZoneRecord 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 an Existing DomainZoneRecord Resource

Get an existing DomainZoneRecord 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?: DomainZoneRecordState, opts?: CustomResourceOptions): DomainZoneRecord
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        fieldtype: Optional[str] = None,
        subdomain: Optional[str] = None,
        target: Optional[str] = None,
        ttl: Optional[int] = None,
        zone: Optional[str] = None) -> DomainZoneRecord
func GetDomainZoneRecord(ctx *Context, name string, id IDInput, state *DomainZoneRecordState, opts ...ResourceOption) (*DomainZoneRecord, error)
public static DomainZoneRecord Get(string name, Input<string> id, DomainZoneRecordState? state, CustomResourceOptions? opts = null)
public static DomainZoneRecord get(String name, Output<String> id, DomainZoneRecordState 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:
Fieldtype string

The type of the record

Subdomain string

The name of the record

Target string

The value of the record

Ttl int

The TTL of the record

Zone string

The domain to add the record to

Fieldtype string

The type of the record

Subdomain string

The name of the record

Target string

The value of the record

Ttl int

The TTL of the record

Zone string

The domain to add the record to

fieldtype String

The type of the record

subdomain String

The name of the record

target String

The value of the record

ttl Integer

The TTL of the record

zone String

The domain to add the record to

fieldtype string

The type of the record

subdomain string

The name of the record

target string

The value of the record

ttl number

The TTL of the record

zone string

The domain to add the record to

fieldtype str

The type of the record

subdomain str

The name of the record

target str

The value of the record

ttl int

The TTL of the record

zone str

The domain to add the record to

fieldtype String

The type of the record

subdomain String

The name of the record

target String

The value of the record

ttl Number

The TTL of the record

zone String

The domain to add the record to

Import

OVH record can be imported using the id and the zone, eg

 $ pulumi import ovh:index/domainZoneRecord:DomainZoneRecord test 1234OVH_ID.zone.tld

Package Details

Repository
https://github.com/lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.