1. Packages
  2. Yandex
  3. API Docs
  4. VpcAddress
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.VpcAddress

Explore with Pulumi AI

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",
            },
        });
    }

}
Copy
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
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

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

addr = yandex.VpcAddress("addr", external_ipv4_address=yandex.VpcAddressExternalIpv4AddressArgs(
    zone_id="ru-central1-a",
))
Copy

Coming soon!

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",
            },
        });
    }

}
Copy
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
	})
}
Copy

Coming soon!

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",
    },
});
Copy
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",
))
Copy

Coming soon!

Create VpcAddress Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VpcAddress(name: string, args?: VpcAddressArgs, opts?: CustomResourceOptions);
@overload
def VpcAddress(resource_name: str,
               args: Optional[VpcAddressArgs] = None,
               opts: Optional[ResourceOptions] = None)

@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)
func NewVpcAddress(ctx *Context, name string, args *VpcAddressArgs, opts ...ResourceOption) (*VpcAddress, error)
public VpcAddress(string name, VpcAddressArgs? args = null, CustomResourceOptions? opts = null)
public VpcAddress(String name, VpcAddressArgs args)
public VpcAddress(String name, VpcAddressArgs args, CustomResourceOptions options)
type: yandex:VpcAddress
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. 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 This property is required. 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 This property is required. 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 This property is required. string
The unique name of the resource.
args VpcAddressArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VpcAddressArgs
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 vpcAddressResource = new Yandex.VpcAddress("vpcAddressResource", new()
{
    Description = "string",
    ExternalIpv4Address = new Yandex.Inputs.VpcAddressExternalIpv4AddressArgs
    {
        Address = "string",
        DdosProtectionProvider = "string",
        OutgoingSmtpCapability = "string",
        ZoneId = "string",
    },
    FolderId = "string",
    Labels = 
    {
        { "string", "string" },
    },
    Name = "string",
});
Copy
example, err := yandex.NewVpcAddress(ctx, "vpcAddressResource", &yandex.VpcAddressArgs{
	Description: pulumi.String("string"),
	ExternalIpv4Address: &yandex.VpcAddressExternalIpv4AddressArgs{
		Address:                pulumi.String("string"),
		DdosProtectionProvider: pulumi.String("string"),
		OutgoingSmtpCapability: pulumi.String("string"),
		ZoneId:                 pulumi.String("string"),
	},
	FolderId: pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name: pulumi.String("string"),
})
Copy
var vpcAddressResource = new VpcAddress("vpcAddressResource", VpcAddressArgs.builder()
    .description("string")
    .externalIpv4Address(VpcAddressExternalIpv4AddressArgs.builder()
        .address("string")
        .ddosProtectionProvider("string")
        .outgoingSmtpCapability("string")
        .zoneId("string")
        .build())
    .folderId("string")
    .labels(Map.of("string", "string"))
    .name("string")
    .build());
Copy
vpc_address_resource = yandex.VpcAddress("vpcAddressResource",
    description="string",
    external_ipv4_address={
        "address": "string",
        "ddos_protection_provider": "string",
        "outgoing_smtp_capability": "string",
        "zone_id": "string",
    },
    folder_id="string",
    labels={
        "string": "string",
    },
    name="string")
Copy
const vpcAddressResource = new yandex.VpcAddress("vpcAddressResource", {
    description: "string",
    externalIpv4Address: {
        address: "string",
        ddosProtectionProvider: "string",
        outgoingSmtpCapability: "string",
        zoneId: "string",
    },
    folderId: "string",
    labels: {
        string: "string",
    },
    name: "string",
});
Copy
type: yandex:VpcAddress
properties:
    description: string
    externalIpv4Address:
        address: string
        ddosProtectionProvider: string
        outgoingSmtpCapability: string
        zoneId: string
    folderId: string
    labels:
        string: string
    name: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

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 VpcAddressExternalIpv4Address

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 VpcAddressExternalIpv4Address

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 VpcAddressExternalIpv4Address

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.
description String
An optional description of this resource. Provide this property when you create the resource.
externalIpv4Address Property Map

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>
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.

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.
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.
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.

Look up 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)
public static VpcAddress get(String name, Output<String> id, VpcAddressState state, CustomResourceOptions options)
resources:  _:    type: yandex:VpcAddress    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 VpcAddressExternalIpv4Address

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 VpcAddressExternalIpv4Address

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 Boolean
false means that address is ephemeral.
used Boolean
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 VpcAddressExternalIpv4Address

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.
createdAt String
Creation timestamp of the key.
description String
An optional description of this resource. Provide this property when you create the resource.
externalIpv4Address Property Map

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>
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.

Supporting Types

VpcAddressExternalIpv4Address
, VpcAddressExternalIpv4AddressArgs

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 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.
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.

Import

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

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

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Yandex pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.