1. Packages
  2. stackit
  3. API Docs
  4. getAffinityGroup
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud

    Affinity Group schema. Must have a region specified in the provider configuration.

    Example Usage

    data "stackit_affinity_group" "example" {
      project_id        = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      affinity_group_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    Using getAffinityGroup

    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 getAffinityGroup(args: GetAffinityGroupArgs, opts?: InvokeOptions): Promise<GetAffinityGroupResult>
    function getAffinityGroupOutput(args: GetAffinityGroupOutputArgs, opts?: InvokeOptions): Output<GetAffinityGroupResult>
    def get_affinity_group(affinity_group_id: Optional[str] = None,
                           project_id: Optional[str] = None,
                           region: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetAffinityGroupResult
    def get_affinity_group_output(affinity_group_id: Optional[pulumi.Input[str]] = None,
                           project_id: Optional[pulumi.Input[str]] = None,
                           region: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetAffinityGroupResult]
    func LookupAffinityGroup(ctx *Context, args *LookupAffinityGroupArgs, opts ...InvokeOption) (*LookupAffinityGroupResult, error)
    func LookupAffinityGroupOutput(ctx *Context, args *LookupAffinityGroupOutputArgs, opts ...InvokeOption) LookupAffinityGroupResultOutput

    > Note: This function is named LookupAffinityGroup in the Go SDK.

    public static class GetAffinityGroup 
    {
        public static Task<GetAffinityGroupResult> InvokeAsync(GetAffinityGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetAffinityGroupResult> Invoke(GetAffinityGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAffinityGroupResult> getAffinityGroup(GetAffinityGroupArgs args, InvokeOptions options)
    public static Output<GetAffinityGroupResult> getAffinityGroup(GetAffinityGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: stackit:index/getAffinityGroup:getAffinityGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AffinityGroupId string
    The affinity group ID.
    ProjectId string
    STACKIT Project ID to which the affinity group is associated.
    Region string
    The resource region. If not defined, the provider region is used.
    AffinityGroupId string
    The affinity group ID.
    ProjectId string
    STACKIT Project ID to which the affinity group is associated.
    Region string
    The resource region. If not defined, the provider region is used.
    affinityGroupId String
    The affinity group ID.
    projectId String
    STACKIT Project ID to which the affinity group is associated.
    region String
    The resource region. If not defined, the provider region is used.
    affinityGroupId string
    The affinity group ID.
    projectId string
    STACKIT Project ID to which the affinity group is associated.
    region string
    The resource region. If not defined, the provider region is used.
    affinity_group_id str
    The affinity group ID.
    project_id str
    STACKIT Project ID to which the affinity group is associated.
    region str
    The resource region. If not defined, the provider region is used.
    affinityGroupId String
    The affinity group ID.
    projectId String
    STACKIT Project ID to which the affinity group is associated.
    region String
    The resource region. If not defined, the provider region is used.

    getAffinityGroup Result

    The following output properties are available:

    AffinityGroupId string
    The affinity group ID.
    Id string
    Members List<string>
    Affinity Group schema. Must have a region specified in the provider configuration.
    Name string
    The name of the affinity group.
    Policy string
    The policy of the affinity group.
    ProjectId string
    STACKIT Project ID to which the affinity group is associated.
    Region string
    The resource region. If not defined, the provider region is used.
    AffinityGroupId string
    The affinity group ID.
    Id string
    Members []string
    Affinity Group schema. Must have a region specified in the provider configuration.
    Name string
    The name of the affinity group.
    Policy string
    The policy of the affinity group.
    ProjectId string
    STACKIT Project ID to which the affinity group is associated.
    Region string
    The resource region. If not defined, the provider region is used.
    affinityGroupId String
    The affinity group ID.
    id String
    members List<String>
    Affinity Group schema. Must have a region specified in the provider configuration.
    name String
    The name of the affinity group.
    policy String
    The policy of the affinity group.
    projectId String
    STACKIT Project ID to which the affinity group is associated.
    region String
    The resource region. If not defined, the provider region is used.
    affinityGroupId string
    The affinity group ID.
    id string
    members string[]
    Affinity Group schema. Must have a region specified in the provider configuration.
    name string
    The name of the affinity group.
    policy string
    The policy of the affinity group.
    projectId string
    STACKIT Project ID to which the affinity group is associated.
    region string
    The resource region. If not defined, the provider region is used.
    affinity_group_id str
    The affinity group ID.
    id str
    members Sequence[str]
    Affinity Group schema. Must have a region specified in the provider configuration.
    name str
    The name of the affinity group.
    policy str
    The policy of the affinity group.
    project_id str
    STACKIT Project ID to which the affinity group is associated.
    region str
    The resource region. If not defined, the provider region is used.
    affinityGroupId String
    The affinity group ID.
    id String
    members List<String>
    Affinity Group schema. Must have a region specified in the provider configuration.
    name String
    The name of the affinity group.
    policy String
    The policy of the affinity group.
    projectId String
    STACKIT Project ID to which the affinity group is associated.
    region String
    The resource region. If not defined, the provider region is used.

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.4
    published on Friday, Feb 20, 2026 by stackitcloud
      Try Pulumi Cloud free. Your team will thank you.