Yandex

v0.10.0 published on Thursday, Nov 18, 2021 by Pulumi

VpcAddress

Manages a address within the Yandex.Cloud. You can only create a reserved (static) address via this resource. An ephemeral address could be obtained via implicit creation at a compute instance creation only. For more information, see the official documentation.

Example Usage

External ipv4 address

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var addr = new Yandex.VpcAddress("addr", new Yandex.VpcAddressArgs
        {
            ExternalIpv4Address = new Yandex.Inputs.VpcAddressExternalIpv4AddressArgs
            {
                ZoneId = "ru-central1-a",
            },
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewVpcAddress(ctx, "addr", &yandex.VpcAddressArgs{
			ExternalIpv4Address: &VpcAddressExternalIpv4AddressArgs{
				ZoneId: pulumi.String("ru-central1-a"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_yandex as yandex

addr = yandex.VpcAddress("addr", external_ipv4_address=yandex.VpcAddressExternalIpv4AddressArgs(
    zone_id="ru-central1-a",
))
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const addr = new yandex.VpcAddress("addr", {
    externalIpv4Address: {
        zoneId: "ru-central1-a",
    },
});

Address with DDoS protection

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var vpnaddr = new Yandex.VpcAddress("vpnaddr", new Yandex.VpcAddressArgs
        {
            ExternalIpv4Address = new Yandex.Inputs.VpcAddressExternalIpv4AddressArgs
            {
                DdosProtectionProvider = "qrator",
                ZoneId = "ru-central1-a",
            },
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewVpcAddress(ctx, "vpnaddr", &yandex.VpcAddressArgs{
			ExternalIpv4Address: &VpcAddressExternalIpv4AddressArgs{
				DdosProtectionProvider: pulumi.String("qrator"),
				ZoneId:                 pulumi.String("ru-central1-a"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_yandex as yandex

vpnaddr = yandex.VpcAddress("vpnaddr", external_ipv4_address=yandex.VpcAddressExternalIpv4AddressArgs(
    ddos_protection_provider="qrator",
    zone_id="ru-central1-a",
))
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const vpnaddr = new yandex.VpcAddress("vpnaddr", {
    externalIpv4Address: {
        ddosProtectionProvider: "qrator",
        zoneId: "ru-central1-a",
    },
});

Create a VpcAddress Resource

new VpcAddress(name: string, args?: VpcAddressArgs, opts?: CustomResourceOptions);
@overload
def VpcAddress(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None,
               external_ipv4_address: Optional[VpcAddressExternalIpv4AddressArgs] = None,
               folder_id: Optional[str] = None,
               labels: Optional[Mapping[str, str]] = None,
               name: Optional[str] = None)
@overload
def VpcAddress(resource_name: str,
               args: Optional[VpcAddressArgs] = None,
               opts: Optional[ResourceOptions] = None)
func NewVpcAddress(ctx *Context, name string, args *VpcAddressArgs, opts ...ResourceOption) (*VpcAddress, error)
public VpcAddress(string name, VpcAddressArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VpcAddressArgs
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 VpcAddressArgs
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 VpcAddressArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VpcAddressArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VpcAddress 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 VpcAddress resource accepts the following input properties:

Description string
An optional description of this resource. Provide this property when you create the resource.
ExternalIpv4Address VpcAddressExternalIpv4AddressArgs

spec of IP v4 address

FolderId string
ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Labels Dictionary<string, string>
Labels to apply to this resource. A list of key/value pairs.
Name string
Name of the address. Provided by the client when the address is created.
Description string
An optional description of this resource. Provide this property when you create the resource.
ExternalIpv4Address VpcAddressExternalIpv4AddressArgs

spec of IP v4 address

FolderId string
ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Labels map[string]string
Labels to apply to this resource. A list of key/value pairs.
Name string
Name of the address. Provided by the client when the address is created.
description string
An optional description of this resource. Provide this property when you create the resource.
externalIpv4Address VpcAddressExternalIpv4AddressArgs

spec of IP v4 address

folderId string
ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels {[key: string]: string}
Labels to apply to this resource. A list of key/value pairs.
name string
Name of the address. Provided by the client when the address is created.
description str
An optional description of this resource. Provide this property when you create the resource.
external_ipv4_address VpcAddressExternalIpv4AddressArgs

spec of IP v4 address

folder_id str
ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels Mapping[str, str]
Labels to apply to this resource. A list of key/value pairs.
name str
Name of the address. Provided by the client when the address is created.

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcAddress resource produces the following output properties:

CreatedAt string
Creation timestamp of the key.
Id string
The provider-assigned unique ID for this managed resource.
Reserved bool
false means that address is ephemeral.
Used bool
true if address is used.
CreatedAt string
Creation timestamp of the key.
Id string
The provider-assigned unique ID for this managed resource.
Reserved bool
false means that address is ephemeral.
Used bool
true if address is used.
createdAt string
Creation timestamp of the key.
id string
The provider-assigned unique ID for this managed resource.
reserved boolean
false means that address is ephemeral.
used boolean
true if address is used.
created_at str
Creation timestamp of the key.
id str
The provider-assigned unique ID for this managed resource.
reserved bool
false means that address is ephemeral.
used bool
true if address is used.

Look up an Existing VpcAddress Resource

Get an existing VpcAddress 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?: VpcAddressState, opts?: CustomResourceOptions): VpcAddress
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        external_ipv4_address: Optional[VpcAddressExternalIpv4AddressArgs] = None,
        folder_id: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        reserved: Optional[bool] = None,
        used: Optional[bool] = None) -> VpcAddress
func GetVpcAddress(ctx *Context, name string, id IDInput, state *VpcAddressState, opts ...ResourceOption) (*VpcAddress, error)
public static VpcAddress Get(string name, Input<string> id, VpcAddressState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

CreatedAt string
Creation timestamp of the key.
Description string
An optional description of this resource. Provide this property when you create the resource.
ExternalIpv4Address VpcAddressExternalIpv4AddressArgs

spec of IP v4 address

FolderId string
ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Labels Dictionary<string, string>
Labels to apply to this resource. A list of key/value pairs.
Name string
Name of the address. Provided by the client when the address is created.
Reserved bool
false means that address is ephemeral.
Used bool
true if address is used.
CreatedAt string
Creation timestamp of the key.
Description string
An optional description of this resource. Provide this property when you create the resource.
ExternalIpv4Address VpcAddressExternalIpv4AddressArgs

spec of IP v4 address

FolderId string
ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Labels map[string]string
Labels to apply to this resource. A list of key/value pairs.
Name string
Name of the address. Provided by the client when the address is created.
Reserved bool
false means that address is ephemeral.
Used bool
true if address is used.
createdAt string
Creation timestamp of the key.
description string
An optional description of this resource. Provide this property when you create the resource.
externalIpv4Address VpcAddressExternalIpv4AddressArgs

spec of IP v4 address

folderId string
ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels {[key: string]: string}
Labels to apply to this resource. A list of key/value pairs.
name string
Name of the address. Provided by the client when the address is created.
reserved boolean
false means that address is ephemeral.
used boolean
true if address is used.
created_at str
Creation timestamp of the key.
description str
An optional description of this resource. Provide this property when you create the resource.
external_ipv4_address VpcAddressExternalIpv4AddressArgs

spec of IP v4 address

folder_id str
ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels Mapping[str, str]
Labels to apply to this resource. A list of key/value pairs.
name str
Name of the address. Provided by the client when the address is created.
reserved bool
false means that address is ephemeral.
used bool
true if address is used.

Supporting Types

VpcAddressExternalIpv4Address

Address string
  • Desired IP.
DdosProtectionProvider string
Enable DDOS protection. Possible values are: “qrator”
OutgoingSmtpCapability string
Wanted outgoing smtp capability.
ZoneId string
  • Zone for allocating address.
Address string
  • Desired IP.
DdosProtectionProvider string
Enable DDOS protection. Possible values are: “qrator”
OutgoingSmtpCapability string
Wanted outgoing smtp capability.
ZoneId string
  • Zone for allocating address.
address string
  • Desired IP.
ddosProtectionProvider string
Enable DDOS protection. Possible values are: “qrator”
outgoingSmtpCapability string
Wanted outgoing smtp capability.
zoneId string
  • Zone for allocating address.
address str
  • Desired IP.
ddos_protection_provider str
Enable DDOS protection. Possible values are: “qrator”
outgoing_smtp_capability str
Wanted outgoing smtp capability.
zone_id str
  • Zone for allocating address.

Import

A address can be imported using the id of the resource, e.g.

 $ pulumi import yandex:index/vpcAddress:VpcAddress addr address_id

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.