Yandex

v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

AlbTargetGroup

Creates a target group in the specified folder and adds the specified targets to it. For more information, see the official documentation.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new Yandex.AlbTargetGroup("foo", new Yandex.AlbTargetGroupArgs
        {
            Targets = 
            {
                new Yandex.Inputs.AlbTargetGroupTargetArgs
                {
                    IpAddress = yandex_compute_instance.My_instance_1.Network_interface[0].Ip_address,
                    SubnetId = yandex_vpc_subnet.My_subnet.Id,
                },
                new Yandex.Inputs.AlbTargetGroupTargetArgs
                {
                    IpAddress = yandex_compute_instance.My_instance_2.Network_interface[0].Ip_address,
                    SubnetId = yandex_vpc_subnet.My_subnet.Id,
                },
            },
        });
    }

}

Coming soon!

Coming soon!

import pulumi
import pulumi_yandex as yandex

foo = yandex.AlbTargetGroup("foo", targets=[
    yandex.AlbTargetGroupTargetArgs(
        ip_address=yandex_compute_instance["my-instance-1"]["network_interface"][0]["ip_address"],
        subnet_id=yandex_vpc_subnet["my-subnet"]["id"],
    ),
    yandex.AlbTargetGroupTargetArgs(
        ip_address=yandex_compute_instance["my-instance-2"]["network_interface"][0]["ip_address"],
        subnet_id=yandex_vpc_subnet["my-subnet"]["id"],
    ),
])
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const foo = new yandex.AlbTargetGroup("foo", {
    targets: [
        {
            ipAddress: yandex_compute_instance_my_instance_1.networkInterface.0.ipAddress,
            subnetId: yandex_vpc_subnet_my_subnet.id,
        },
        {
            ipAddress: yandex_compute_instance_my_instance_2.networkInterface.0.ipAddress,
            subnetId: yandex_vpc_subnet_my_subnet.id,
        },
    ],
});

Coming soon!

Create AlbTargetGroup Resource

new AlbTargetGroup(name: string, args?: AlbTargetGroupArgs, opts?: CustomResourceOptions);
@overload
def AlbTargetGroup(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   description: Optional[str] = None,
                   folder_id: Optional[str] = None,
                   labels: Optional[Mapping[str, str]] = None,
                   name: Optional[str] = None,
                   targets: Optional[Sequence[AlbTargetGroupTargetArgs]] = None)
@overload
def AlbTargetGroup(resource_name: str,
                   args: Optional[AlbTargetGroupArgs] = None,
                   opts: Optional[ResourceOptions] = None)
func NewAlbTargetGroup(ctx *Context, name string, args *AlbTargetGroupArgs, opts ...ResourceOption) (*AlbTargetGroup, error)
public AlbTargetGroup(string name, AlbTargetGroupArgs? args = null, CustomResourceOptions? opts = null)
public AlbTargetGroup(String name, AlbTargetGroupArgs args)
public AlbTargetGroup(String name, AlbTargetGroupArgs args, CustomResourceOptions options)
type: yandex:AlbTargetGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AlbTargetGroupArgs
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 AlbTargetGroupArgs
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 AlbTargetGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AlbTargetGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AlbTargetGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Description string

An optional description of the target group. Provide this property when you create the resource.

FolderId string

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

Labels Dictionary<string, string>

Labels to assign to this target group. A list of key/value pairs.

Name string

Name of the target group. Provided by the client when the target group is created.

Targets List<AlbTargetGroupTargetArgs>

A Target resource. The structure is documented below.

Description string

An optional description of the target group. Provide this property when you create the resource.

FolderId string

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

Labels map[string]string

Labels to assign to this target group. A list of key/value pairs.

Name string

Name of the target group. Provided by the client when the target group is created.

Targets []AlbTargetGroupTargetArgs

A Target resource. The structure is documented below.

description String

An optional description of the target group. Provide this property when you create the resource.

folderId String

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

labels Map<String,String>

Labels to assign to this target group. A list of key/value pairs.

name String

Name of the target group. Provided by the client when the target group is created.

targets List<AlbTargetGroupTargetArgs>

A Target resource. The structure is documented below.

description string

An optional description of the target group. Provide this property when you create the resource.

folderId string

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

labels {[key: string]: string}

Labels to assign to this target group. A list of key/value pairs.

name string

Name of the target group. Provided by the client when the target group is created.

targets AlbTargetGroupTargetArgs[]

A Target resource. The structure is documented below.

description str

An optional description of the target group. Provide this property when you create the resource.

folder_id str

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

labels Mapping[str, str]

Labels to assign to this target group. A list of key/value pairs.

name str

Name of the target group. Provided by the client when the target group is created.

targets Sequence[AlbTargetGroupTargetArgs]

A Target resource. The structure is documented below.

description String

An optional description of the target group. Provide this property when you create the resource.

folderId String

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

labels Map<String>

Labels to assign to this target group. A list of key/value pairs.

name String

Name of the target group. Provided by the client when the target group is created.

targets List<Property Map>

A Target resource. The structure is documented below.

Outputs

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

CreatedAt string

The target group creation timestamp.

Id string

The provider-assigned unique ID for this managed resource.

CreatedAt string

The target group creation timestamp.

Id string

The provider-assigned unique ID for this managed resource.

createdAt String

The target group creation timestamp.

id String

The provider-assigned unique ID for this managed resource.

createdAt string

The target group creation timestamp.

id string

The provider-assigned unique ID for this managed resource.

created_at str

The target group creation timestamp.

id str

The provider-assigned unique ID for this managed resource.

createdAt String

The target group creation timestamp.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing AlbTargetGroup Resource

Get an existing AlbTargetGroup 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?: AlbTargetGroupState, opts?: CustomResourceOptions): AlbTargetGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        folder_id: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        targets: Optional[Sequence[AlbTargetGroupTargetArgs]] = None) -> AlbTargetGroup
func GetAlbTargetGroup(ctx *Context, name string, id IDInput, state *AlbTargetGroupState, opts ...ResourceOption) (*AlbTargetGroup, error)
public static AlbTargetGroup Get(string name, Input<string> id, AlbTargetGroupState? state, CustomResourceOptions? opts = null)
public static AlbTargetGroup get(String name, Output<String> id, AlbTargetGroupState 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.
The following state arguments are supported:
CreatedAt string

The target group creation timestamp.

Description string

An optional description of the target group. Provide this property when you create the resource.

FolderId string

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

Labels Dictionary<string, string>

Labels to assign to this target group. A list of key/value pairs.

Name string

Name of the target group. Provided by the client when the target group is created.

Targets List<AlbTargetGroupTargetArgs>

A Target resource. The structure is documented below.

CreatedAt string

The target group creation timestamp.

Description string

An optional description of the target group. Provide this property when you create the resource.

FolderId string

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

Labels map[string]string

Labels to assign to this target group. A list of key/value pairs.

Name string

Name of the target group. Provided by the client when the target group is created.

Targets []AlbTargetGroupTargetArgs

A Target resource. The structure is documented below.

createdAt String

The target group creation timestamp.

description String

An optional description of the target group. Provide this property when you create the resource.

folderId String

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

labels Map<String,String>

Labels to assign to this target group. A list of key/value pairs.

name String

Name of the target group. Provided by the client when the target group is created.

targets List<AlbTargetGroupTargetArgs>

A Target resource. The structure is documented below.

createdAt string

The target group creation timestamp.

description string

An optional description of the target group. Provide this property when you create the resource.

folderId string

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

labels {[key: string]: string}

Labels to assign to this target group. A list of key/value pairs.

name string

Name of the target group. Provided by the client when the target group is created.

targets AlbTargetGroupTargetArgs[]

A Target resource. The structure is documented below.

created_at str

The target group creation timestamp.

description str

An optional description of the target group. Provide this property when you create the resource.

folder_id str

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

labels Mapping[str, str]

Labels to assign to this target group. A list of key/value pairs.

name str

Name of the target group. Provided by the client when the target group is created.

targets Sequence[AlbTargetGroupTargetArgs]

A Target resource. The structure is documented below.

createdAt String

The target group creation timestamp.

description String

An optional description of the target group. Provide this property when you create the resource.

folderId String

The ID of the folder to which the resource belongs. If omitted, the provider folder is used.

labels Map<String>

Labels to assign to this target group. A list of key/value pairs.

name String

Name of the target group. Provided by the client when the target group is created.

targets List<Property Map>

A Target resource. The structure is documented below.

Supporting Types

AlbTargetGroupTarget

IpAddress string

IP address of the target.

PrivateIpv4Address bool
SubnetId string

ID of the subnet that targets are connected to. All targets in the target group must be connected to the same subnet within a single availability zone.

IpAddress string

IP address of the target.

PrivateIpv4Address bool
SubnetId string

ID of the subnet that targets are connected to. All targets in the target group must be connected to the same subnet within a single availability zone.

ipAddress String

IP address of the target.

privateIpv4Address Boolean
subnetId String

ID of the subnet that targets are connected to. All targets in the target group must be connected to the same subnet within a single availability zone.

ipAddress string

IP address of the target.

privateIpv4Address boolean
subnetId string

ID of the subnet that targets are connected to. All targets in the target group must be connected to the same subnet within a single availability zone.

ip_address str

IP address of the target.

private_ipv4_address bool
subnet_id str

ID of the subnet that targets are connected to. All targets in the target group must be connected to the same subnet within a single availability zone.

ipAddress String

IP address of the target.

privateIpv4Address Boolean
subnetId String

ID of the subnet that targets are connected to. All targets in the target group must be connected to the same subnet within a single availability zone.

Import

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

 $ pulumi import yandex:index/albTargetGroup:AlbTargetGroup default target_group_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.