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 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",
},
});
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 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",
},
});
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=yandex.VpcAddressExternalIpv4AddressArgs(
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
The VpcAddress resource accepts the following input properties:
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- External
Ipv4Address VpcAddress External Ipv4Address spec of IP v4 address
- Folder
Id 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.
- External
Ipv4Address VpcAddress External Ipv4Address Args spec of IP v4 address
- Folder
Id 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.
- external
Ipv4Address VpcAddress External Ipv4Address spec of IP v4 address
- folder
Id 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.
- external
Ipv4Address VpcAddress External Ipv4Address spec of IP v4 address
- folder
Id 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.
- external
Ipv4Address Property Map spec of IP v4 address
- folder
Id 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
false
means that address is ephemeral.- used bool
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)
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.
- Created
At string - Creation timestamp of the key.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- External
Ipv4Address VpcAddress External Ipv4Address spec of IP v4 address
- Folder
Id 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.
- Created
At string - Creation timestamp of the key.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- External
Ipv4Address VpcAddress External Ipv4Address Args spec of IP v4 address
- Folder
Id 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.
- created
At String - Creation timestamp of the key.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- external
Ipv4Address VpcAddress External Ipv4Address spec of IP v4 address
- folder
Id 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.
- created
At string - Creation timestamp of the key.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- external
Ipv4Address VpcAddress External Ipv4Address spec of IP v4 address
- folder
Id 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_ 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
false
means that address is ephemeral.- used bool
true
if address is used.
- created
At String - Creation timestamp of the key.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- external
Ipv4Address Property Map spec of IP v4 address
- folder
Id 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.
- Ddos
Protection stringProvider - Enable DDOS protection. Possible values are: "qrator"
- Outgoing
Smtp stringCapability - Wanted outgoing smtp capability.
- Zone
Id string - Zone for allocating address.
- Address string
- Desired IP.
- Ddos
Protection stringProvider - Enable DDOS protection. Possible values are: "qrator"
- Outgoing
Smtp stringCapability - Wanted outgoing smtp capability.
- Zone
Id string - Zone for allocating address.
- address String
- Desired IP.
- ddos
Protection StringProvider - Enable DDOS protection. Possible values are: "qrator"
- outgoing
Smtp StringCapability - Wanted outgoing smtp capability.
- zone
Id String - Zone for allocating address.
- address string
- Desired IP.
- ddos
Protection stringProvider - Enable DDOS protection. Possible values are: "qrator"
- outgoing
Smtp stringCapability - Wanted outgoing smtp capability.
- zone
Id 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.
- ddos
Protection StringProvider - Enable DDOS protection. Possible values are: "qrator"
- outgoing
Smtp StringCapability - Wanted outgoing smtp capability.
- zone
Id 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
yandex
Terraform Provider.