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.
- How-to Guides
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
	})
}
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",
    },
});
import pulumi
import pulumi_yandex as yandex
addr = yandex.VpcAddress("addr", external_ipv4_address=yandex.VpcAddressExternalIpv4AddressArgs(
    zone_id="ru-central1-a",
))
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",
            },
        });
    }
}
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
	})
}
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",
    },
});
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",
))
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 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.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
const vpcAddressResource = new yandex.VpcAddress("vpcAddressResource", {
    description: "string",
    externalIpv4Address: {
        address: "string",
        ddosProtectionProvider: "string",
        outgoingSmtpCapability: "string",
        zoneId: "string",
    },
    folderId: "string",
    labels: {
        string: "string",
    },
    name: "string",
});
type: yandex:VpcAddress
properties:
    description: string
    externalIpv4Address:
        address: string
        ddosProtectionProvider: string
        outgoingSmtpCapability: string
        zoneId: string
    folderId: string
    labels:
        string: string
    name: string
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 VpcAddress External Ipv4Address 
- 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 VpcAddress External Ipv4Address Args 
- 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 VpcAddress External Ipv4Address 
- 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 VpcAddress External Ipv4Address 
- 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_ Vpcaddress Address External Ipv4Address Args 
- 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:
- created_at str
- Creation timestamp of the key.
- id str
- The provider-assigned unique ID for this managed resource.
- reserved bool
- falsemeans that address is ephemeral.
- used bool
- trueif 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) -> VpcAddressfunc 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
- 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.
- CreatedAt string
- Creation timestamp of the key.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- ExternalIpv4Address VpcAddress External Ipv4Address 
- 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
- falsemeans that address is ephemeral.
- Used bool
- trueif 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 VpcAddress External Ipv4Address Args 
- 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
- falsemeans that address is ephemeral.
- Used bool
- trueif 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 VpcAddress External Ipv4Address 
- 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
- falsemeans that address is ephemeral.
- used Boolean
- trueif 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 VpcAddress External Ipv4Address 
- 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
- falsemeans that address is ephemeral.
- used boolean
- trueif 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_ Vpcaddress Address External Ipv4Address Args 
- 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
- falsemeans that address is ephemeral.
- used bool
- trueif 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
- falsemeans that address is ephemeral.
- used Boolean
- trueif address is used.
Supporting Types
VpcAddressExternalIpv4Address, VpcAddressExternalIpv4AddressArgs        
- Address string
- Desired IP.
 
- DdosProtection stringProvider 
- Enable DDOS protection. Possible values are: "qrator"
- OutgoingSmtp stringCapability 
- Wanted outgoing smtp capability.
- ZoneId string
- Zone for allocating address.
 
- Address string
- Desired IP.
 
- DdosProtection stringProvider 
- Enable DDOS protection. Possible values are: "qrator"
- OutgoingSmtp stringCapability 
- Wanted outgoing smtp capability.
- ZoneId string
- Zone for allocating address.
 
- address String
- Desired IP.
 
- ddosProtection StringProvider 
- Enable DDOS protection. Possible values are: "qrator"
- outgoingSmtp StringCapability 
- Wanted outgoing smtp capability.
- zoneId String
- Zone for allocating address.
 
- address string
- Desired IP.
 
- ddosProtection stringProvider 
- Enable DDOS protection. Possible values are: "qrator"
- outgoingSmtp stringCapability 
- Wanted outgoing smtp capability.
- zoneId string
- Zone for allocating address.
 
- address str
- Desired IP.
 
- ddos_protection_ strprovider 
- Enable DDOS protection. Possible values are: "qrator"
- outgoing_smtp_ strcapability 
- Wanted outgoing smtp capability.
- zone_id str
- Zone for allocating address.
 
- address String
- Desired IP.
 
- ddosProtection StringProvider 
- Enable DDOS protection. Possible values are: "qrator"
- outgoingSmtp StringCapability 
- 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
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 yandexTerraform Provider.