openstack.dns.ZoneShareV2
Explore with Pulumi AI
Manages the sharing of a DNS zone in the OpenStack DNS Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const example = new openstack.dns.ZoneShareV2("example", {
zoneId: "00000000-0000-0000-0000-000000000000",
targetProjectId: "11111111-1111-1111-1111-111111111111",
projectId: "22222222-2222-2222-2222-222222222222",
});
import pulumi
import pulumi_openstack as openstack
example = openstack.dns.ZoneShareV2("example",
zone_id="00000000-0000-0000-0000-000000000000",
target_project_id="11111111-1111-1111-1111-111111111111",
project_id="22222222-2222-2222-2222-222222222222")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dns.NewZoneShareV2(ctx, "example", &dns.ZoneShareV2Args{
ZoneId: pulumi.String("00000000-0000-0000-0000-000000000000"),
TargetProjectId: pulumi.String("11111111-1111-1111-1111-111111111111"),
ProjectId: pulumi.String("22222222-2222-2222-2222-222222222222"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var example = new OpenStack.Dns.ZoneShareV2("example", new()
{
ZoneId = "00000000-0000-0000-0000-000000000000",
TargetProjectId = "11111111-1111-1111-1111-111111111111",
ProjectId = "22222222-2222-2222-2222-222222222222",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.dns.ZoneShareV2;
import com.pulumi.openstack.dns.ZoneShareV2Args;
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 ZoneShareV2("example", ZoneShareV2Args.builder()
.zoneId("00000000-0000-0000-0000-000000000000")
.targetProjectId("11111111-1111-1111-1111-111111111111")
.projectId("22222222-2222-2222-2222-222222222222")
.build());
}
}
resources:
example:
type: openstack:dns:ZoneShareV2
properties:
zoneId: 00000000-0000-0000-0000-000000000000
targetProjectId: 11111111-1111-1111-1111-111111111111
projectId: 22222222-2222-2222-2222-222222222222
Create ZoneShareV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZoneShareV2(name: string, args: ZoneShareV2Args, opts?: CustomResourceOptions);
@overload
def ZoneShareV2(resource_name: str,
args: ZoneShareV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def ZoneShareV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
target_project_id: Optional[str] = None,
zone_id: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None)
func NewZoneShareV2(ctx *Context, name string, args ZoneShareV2Args, opts ...ResourceOption) (*ZoneShareV2, error)
public ZoneShareV2(string name, ZoneShareV2Args args, CustomResourceOptions? opts = null)
public ZoneShareV2(String name, ZoneShareV2Args args)
public ZoneShareV2(String name, ZoneShareV2Args args, CustomResourceOptions options)
type: openstack:dns:ZoneShareV2
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 ZoneShareV2Args
- 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 ZoneShareV2Args
- 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 ZoneShareV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZoneShareV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZoneShareV2Args
- 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 zoneShareV2Resource = new OpenStack.Dns.ZoneShareV2("zoneShareV2Resource", new()
{
TargetProjectId = "string",
ZoneId = "string",
ProjectId = "string",
Region = "string",
});
example, err := dns.NewZoneShareV2(ctx, "zoneShareV2Resource", &dns.ZoneShareV2Args{
TargetProjectId: pulumi.String("string"),
ZoneId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
})
var zoneShareV2Resource = new ZoneShareV2("zoneShareV2Resource", ZoneShareV2Args.builder()
.targetProjectId("string")
.zoneId("string")
.projectId("string")
.region("string")
.build());
zone_share_v2_resource = openstack.dns.ZoneShareV2("zoneShareV2Resource",
target_project_id="string",
zone_id="string",
project_id="string",
region="string")
const zoneShareV2Resource = new openstack.dns.ZoneShareV2("zoneShareV2Resource", {
targetProjectId: "string",
zoneId: "string",
projectId: "string",
region: "string",
});
type: openstack:dns:ZoneShareV2
properties:
projectId: string
region: string
targetProjectId: string
zoneId: string
ZoneShareV2 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 ZoneShareV2 resource accepts the following input properties:
- Target
Project stringId - The ID of the target project with which the DNS zone will be shared.
- Zone
Id string - The ID of the DNS zone to be shared.
- Project
Id string - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - Region string
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share.
- Target
Project stringId - The ID of the target project with which the DNS zone will be shared.
- Zone
Id string - The ID of the DNS zone to be shared.
- Project
Id string - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - Region string
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share.
- target
Project StringId - The ID of the target project with which the DNS zone will be shared.
- zone
Id String - The ID of the DNS zone to be shared.
- project
Id String - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - region String
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share.
- target
Project stringId - The ID of the target project with which the DNS zone will be shared.
- zone
Id string - The ID of the DNS zone to be shared.
- project
Id string - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - region string
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share.
- target_
project_ strid - The ID of the target project with which the DNS zone will be shared.
- zone_
id str - The ID of the DNS zone to be shared.
- project_
id str - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - region str
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share.
- target
Project StringId - The ID of the target project with which the DNS zone will be shared.
- zone
Id String - The ID of the DNS zone to be shared.
- project
Id String - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - region String
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share.
Outputs
All input properties are implicitly available as output properties. Additionally, the ZoneShareV2 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 ZoneShareV2 Resource
Get an existing ZoneShareV2 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?: ZoneShareV2State, opts?: CustomResourceOptions): ZoneShareV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
target_project_id: Optional[str] = None,
zone_id: Optional[str] = None) -> ZoneShareV2
func GetZoneShareV2(ctx *Context, name string, id IDInput, state *ZoneShareV2State, opts ...ResourceOption) (*ZoneShareV2, error)
public static ZoneShareV2 Get(string name, Input<string> id, ZoneShareV2State? state, CustomResourceOptions? opts = null)
public static ZoneShareV2 get(String name, Output<String> id, ZoneShareV2State state, CustomResourceOptions options)
resources: _: type: openstack:dns:ZoneShareV2 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.
- Project
Id string - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - Region string
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share. - Target
Project stringId - The ID of the target project with which the DNS zone will be shared.
- Zone
Id string - The ID of the DNS zone to be shared.
- Project
Id string - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - Region string
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share. - Target
Project stringId - The ID of the target project with which the DNS zone will be shared.
- Zone
Id string - The ID of the DNS zone to be shared.
- project
Id String - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - region String
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share. - target
Project StringId - The ID of the target project with which the DNS zone will be shared.
- zone
Id String - The ID of the DNS zone to be shared.
- project
Id string - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - region string
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share. - target
Project stringId - The ID of the target project with which the DNS zone will be shared.
- zone
Id string - The ID of the DNS zone to be shared.
- project_
id str - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - region str
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share. - target_
project_ strid - The ID of the target project with which the DNS zone will be shared.
- zone_
id str - The ID of the DNS zone to be shared.
- project
Id String - The ID of the project DNS zone is created for, sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project). - region String
- The region in which to obtain the V2 DNS client. If
omitted, the
region
argument of the provider is used. Changing this creates a new DNS zone share. - target
Project StringId - The ID of the target project with which the DNS zone will be shared.
- zone
Id String - The ID of the DNS zone to be shared.
Import
DNS zone share can be imported by specifying the zone ID with share ID and optional project ID:
bash
$ pulumi import openstack:dns/zoneShareV2:ZoneShareV2 share_1 60cbdc69-64f9-49ee-b294-352e71e22827/0e1dae51-aee2-4b44-962f-885bb69f3a5c
$ pulumi import openstack:dns/zoneShareV2:ZoneShareV2 share_1 60cbdc69-64f9-49ee-b294-352e71e22827/0e1dae51-aee2-4b44-962f-885bb69f3a5c/eb92139f6c054a878852ac9e8cbe612a
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.