ionoscloud.getTargetGroup
Explore with Pulumi AI
The Target Group data source can be used to search for and return an existing Application Load Balancer Target Group. You can provide a string for the name parameter which will be compared with provisioned Application Load Balancer Target Groups. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search and make sure that your resources have unique names.
Example Usage
By Id
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getTargetGroup({
id: "target_group_id",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_target_group(id="target_group_id")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupTargetGroup(ctx, &ionoscloud.LookupTargetGroupArgs{
Id: pulumi.StringRef("target_group_id"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetTargetGroup.Invoke(new()
{
Id = "target_group_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetTargetGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IonoscloudFunctions.getTargetGroup(GetTargetGroupArgs.builder()
.id("target_group_id")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getTargetGroup
arguments:
id: target_group_id
By Name
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getTargetGroup({
name: "Target Group Example",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_target_group(name="Target Group Example")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupTargetGroup(ctx, &ionoscloud.LookupTargetGroupArgs{
Name: pulumi.StringRef("Target Group Example"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetTargetGroup.Invoke(new()
{
Name = "Target Group Example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetTargetGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IonoscloudFunctions.getTargetGroup(GetTargetGroupArgs.builder()
.name("Target Group Example")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getTargetGroup
arguments:
name: Target Group Example
By Name with Partial Match
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getTargetGroup({
name: "Example",
partialMatch: true,
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_target_group(name="Example",
partial_match=True)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupTargetGroup(ctx, &ionoscloud.LookupTargetGroupArgs{
Name: pulumi.StringRef("Example"),
PartialMatch: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetTargetGroup.Invoke(new()
{
Name = "Example",
PartialMatch = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetTargetGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IonoscloudFunctions.getTargetGroup(GetTargetGroupArgs.builder()
.name("Example")
.partialMatch(true)
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getTargetGroup
arguments:
name: Example
partialMatch: true
Using getTargetGroup
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTargetGroup(args: GetTargetGroupArgs, opts?: InvokeOptions): Promise<GetTargetGroupResult>
function getTargetGroupOutput(args: GetTargetGroupOutputArgs, opts?: InvokeOptions): Output<GetTargetGroupResult>
def get_target_group(id: Optional[str] = None,
name: Optional[str] = None,
partial_match: Optional[bool] = None,
timeouts: Optional[GetTargetGroupTimeouts] = None,
opts: Optional[InvokeOptions] = None) -> GetTargetGroupResult
def get_target_group_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
partial_match: Optional[pulumi.Input[bool]] = None,
timeouts: Optional[pulumi.Input[GetTargetGroupTimeoutsArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTargetGroupResult]
func LookupTargetGroup(ctx *Context, args *LookupTargetGroupArgs, opts ...InvokeOption) (*LookupTargetGroupResult, error)
func LookupTargetGroupOutput(ctx *Context, args *LookupTargetGroupOutputArgs, opts ...InvokeOption) LookupTargetGroupResultOutput
> Note: This function is named LookupTargetGroup
in the Go SDK.
public static class GetTargetGroup
{
public static Task<GetTargetGroupResult> InvokeAsync(GetTargetGroupArgs args, InvokeOptions? opts = null)
public static Output<GetTargetGroupResult> Invoke(GetTargetGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTargetGroupResult> getTargetGroup(GetTargetGroupArgs args, InvokeOptions options)
public static Output<GetTargetGroupResult> getTargetGroup(GetTargetGroupArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:index/getTargetGroup:getTargetGroup
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- ID of the target group you want to search for.
- Name string
- Name of an existing target group that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - Partial
Match bool Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Timeouts
Get
Target Group Timeouts
- Id string
- ID of the target group you want to search for.
- Name string
- Name of an existing target group that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - Partial
Match bool Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Timeouts
Get
Target Group Timeouts
- id String
- ID of the target group you want to search for.
- name String
- Name of an existing target group that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial
Match Boolean Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- timeouts
Get
Target Group Timeouts
- id string
- ID of the target group you want to search for.
- name string
- Name of an existing target group that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial
Match boolean Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- timeouts
Get
Target Group Timeouts
- id str
- ID of the target group you want to search for.
- name str
- Name of an existing target group that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial_
match bool Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- timeouts
Get
Target Group Timeouts
- id String
- ID of the target group you want to search for.
- name String
- Name of an existing target group that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial
Match Boolean Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- timeouts Property Map
getTargetGroup Result
The following output properties are available:
- Algorithm string
- Balancing algorithm.
- Health
Checks List<GetTarget Group Health Check> - Health check attributes for Target Group.
- Http
Health List<GetChecks Target Group Http Health Check> - Http health check attributes for Target Group
- Id string
- The Id of that Target group
- Name string
- The name of that Target Group.
- Protocol string
- Balancing protocol.
- Protocol
Version string - The forwarding protocol version. Value is ignored when protocol is not 'HTTP'.
- Targets
List<Get
Target Group Target> - Array of items in the collection
- Partial
Match bool - Timeouts
Get
Target Group Timeouts
- Algorithm string
- Balancing algorithm.
- Health
Checks []GetTarget Group Health Check - Health check attributes for Target Group.
- Http
Health []GetChecks Target Group Http Health Check - Http health check attributes for Target Group
- Id string
- The Id of that Target group
- Name string
- The name of that Target Group.
- Protocol string
- Balancing protocol.
- Protocol
Version string - The forwarding protocol version. Value is ignored when protocol is not 'HTTP'.
- Targets
[]Get
Target Group Target - Array of items in the collection
- Partial
Match bool - Timeouts
Get
Target Group Timeouts
- algorithm String
- Balancing algorithm.
- health
Checks List<GetTarget Group Health Check> - Health check attributes for Target Group.
- http
Health List<GetChecks Target Group Http Health Check> - Http health check attributes for Target Group
- id String
- The Id of that Target group
- name String
- The name of that Target Group.
- protocol String
- Balancing protocol.
- protocol
Version String - The forwarding protocol version. Value is ignored when protocol is not 'HTTP'.
- targets
List<Get
Target Group Target> - Array of items in the collection
- partial
Match Boolean - timeouts
Get
Target Group Timeouts
- algorithm string
- Balancing algorithm.
- health
Checks GetTarget Group Health Check[] - Health check attributes for Target Group.
- http
Health GetChecks Target Group Http Health Check[] - Http health check attributes for Target Group
- id string
- The Id of that Target group
- name string
- The name of that Target Group.
- protocol string
- Balancing protocol.
- protocol
Version string - The forwarding protocol version. Value is ignored when protocol is not 'HTTP'.
- targets
Get
Target Group Target[] - Array of items in the collection
- partial
Match boolean - timeouts
Get
Target Group Timeouts
- algorithm str
- Balancing algorithm.
- health_
checks Sequence[GetTarget Group Health Check] - Health check attributes for Target Group.
- http_
health_ Sequence[Getchecks Target Group Http Health Check] - Http health check attributes for Target Group
- id str
- The Id of that Target group
- name str
- The name of that Target Group.
- protocol str
- Balancing protocol.
- protocol_
version str - The forwarding protocol version. Value is ignored when protocol is not 'HTTP'.
- targets
Sequence[Get
Target Group Target] - Array of items in the collection
- partial_
match bool - timeouts
Get
Target Group Timeouts
- algorithm String
- Balancing algorithm.
- health
Checks List<Property Map> - Health check attributes for Target Group.
- http
Health List<Property Map>Checks - Http health check attributes for Target Group
- id String
- The Id of that Target group
- name String
- The name of that Target Group.
- protocol String
- Balancing protocol.
- protocol
Version String - The forwarding protocol version. Value is ignored when protocol is not 'HTTP'.
- targets List<Property Map>
- Array of items in the collection
- partial
Match Boolean - timeouts Property Map
Supporting Types
GetTargetGroupHealthCheck
- Check
Interval double - The interval in milliseconds between consecutive health checks; default is 2000.
- Check
Timeout double - The maximum time in milliseconds to wait for a target to respond to a check. For target VMs with 'Check Interval' set, the lesser of the two values is used once the TCP connection is established.
- Retries double
- The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535, and default is three reconnection.
- Check
Interval float64 - The interval in milliseconds between consecutive health checks; default is 2000.
- Check
Timeout float64 - The maximum time in milliseconds to wait for a target to respond to a check. For target VMs with 'Check Interval' set, the lesser of the two values is used once the TCP connection is established.
- Retries float64
- The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535, and default is three reconnection.
- check
Interval Double - The interval in milliseconds between consecutive health checks; default is 2000.
- check
Timeout Double - The maximum time in milliseconds to wait for a target to respond to a check. For target VMs with 'Check Interval' set, the lesser of the two values is used once the TCP connection is established.
- retries Double
- The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535, and default is three reconnection.
- check
Interval number - The interval in milliseconds between consecutive health checks; default is 2000.
- check
Timeout number - The maximum time in milliseconds to wait for a target to respond to a check. For target VMs with 'Check Interval' set, the lesser of the two values is used once the TCP connection is established.
- retries number
- The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535, and default is three reconnection.
- check_
interval float - The interval in milliseconds between consecutive health checks; default is 2000.
- check_
timeout float - The maximum time in milliseconds to wait for a target to respond to a check. For target VMs with 'Check Interval' set, the lesser of the two values is used once the TCP connection is established.
- retries float
- The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535, and default is three reconnection.
- check
Interval Number - The interval in milliseconds between consecutive health checks; default is 2000.
- check
Timeout Number - The maximum time in milliseconds to wait for a target to respond to a check. For target VMs with 'Check Interval' set, the lesser of the two values is used once the TCP connection is established.
- retries Number
- The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535, and default is three reconnection.
GetTargetGroupHttpHealthCheck
GetTargetGroupTarget
- Health
Check boolEnabled - Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. Default is True.
- Ip string
- The IP of the balanced target VM.
- Maintenance
Enabled bool - Maintenance mode prevents the target from receiving balanced traffic.
- Port double
- The port of the balanced target service; valid range is 1 to 65535.
- Proxy
Protocol string - The proxy protocol version.
- Weight double
- Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1; targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best use values in the middle of the range to leave room for later adjustments.
- Health
Check boolEnabled - Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. Default is True.
- Ip string
- The IP of the balanced target VM.
- Maintenance
Enabled bool - Maintenance mode prevents the target from receiving balanced traffic.
- Port float64
- The port of the balanced target service; valid range is 1 to 65535.
- Proxy
Protocol string - The proxy protocol version.
- Weight float64
- Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1; targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best use values in the middle of the range to leave room for later adjustments.
- health
Check BooleanEnabled - Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. Default is True.
- ip String
- The IP of the balanced target VM.
- maintenance
Enabled Boolean - Maintenance mode prevents the target from receiving balanced traffic.
- port Double
- The port of the balanced target service; valid range is 1 to 65535.
- proxy
Protocol String - The proxy protocol version.
- weight Double
- Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1; targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best use values in the middle of the range to leave room for later adjustments.
- health
Check booleanEnabled - Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. Default is True.
- ip string
- The IP of the balanced target VM.
- maintenance
Enabled boolean - Maintenance mode prevents the target from receiving balanced traffic.
- port number
- The port of the balanced target service; valid range is 1 to 65535.
- proxy
Protocol string - The proxy protocol version.
- weight number
- Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1; targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best use values in the middle of the range to leave room for later adjustments.
- health_
check_ boolenabled - Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. Default is True.
- ip str
- The IP of the balanced target VM.
- maintenance_
enabled bool - Maintenance mode prevents the target from receiving balanced traffic.
- port float
- The port of the balanced target service; valid range is 1 to 65535.
- proxy_
protocol str - The proxy protocol version.
- weight float
- Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1; targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best use values in the middle of the range to leave room for later adjustments.
- health
Check BooleanEnabled - Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. Default is True.
- ip String
- The IP of the balanced target VM.
- maintenance
Enabled Boolean - Maintenance mode prevents the target from receiving balanced traffic.
- port Number
- The port of the balanced target service; valid range is 1 to 65535.
- proxy
Protocol String - The proxy protocol version.
- weight Number
- Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1; targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best use values in the middle of the range to leave room for later adjustments.
GetTargetGroupTimeouts
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.