1. Packages
  2. Redpanda Provider
  3. API Docs
  4. getResourceGroup
redpanda 0.15.1 published on Wednesday, Apr 16, 2025 by redpanda-data

redpanda.getResourceGroup

Explore with Pulumi AI

Data source for a Redpanda Cloud resource group

Usage

Search by ID

import * as pulumi from "@pulumi/pulumi";
import * as redpanda from "@pulumi/redpanda";

const example = redpanda.getResourceGroup({
    id: "resource_group_id",
});
Copy
import pulumi
import pulumi_redpanda as redpanda

example = redpanda.get_resource_group(id="resource_group_id")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/redpanda/redpanda"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := redpanda.LookupResourceGroup(ctx, &redpanda.LookupResourceGroupArgs{
			Id: pulumi.StringRef("resource_group_id"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Redpanda = Pulumi.Redpanda;

return await Deployment.RunAsync(() => 
{
    var example = Redpanda.GetResourceGroup.Invoke(new()
    {
        Id = "resource_group_id",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.redpanda.RedpandaFunctions;
import com.pulumi.redpanda.inputs.GetResourceGroupArgs;
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 = RedpandaFunctions.getResourceGroup(GetResourceGroupArgs.builder()
            .id("resource_group_id")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: redpanda:getResourceGroup
      arguments:
        id: resource_group_id
Copy

Search by name

import * as pulumi from "@pulumi/pulumi";
import * as redpanda from "@pulumi/redpanda";

const example = redpanda.getResourceGroup({
    name: "default",
});
Copy
import pulumi
import pulumi_redpanda as redpanda

example = redpanda.get_resource_group(name="default")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/redpanda/redpanda"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := redpanda.LookupResourceGroup(ctx, &redpanda.LookupResourceGroupArgs{
			Name: pulumi.StringRef("default"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Redpanda = Pulumi.Redpanda;

return await Deployment.RunAsync(() => 
{
    var example = Redpanda.GetResourceGroup.Invoke(new()
    {
        Name = "default",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.redpanda.RedpandaFunctions;
import com.pulumi.redpanda.inputs.GetResourceGroupArgs;
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 = RedpandaFunctions.getResourceGroup(GetResourceGroupArgs.builder()
            .name("default")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: redpanda:getResourceGroup
      arguments:
        name: default
Copy

Using getResourceGroup

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 getResourceGroup(args: GetResourceGroupArgs, opts?: InvokeOptions): Promise<GetResourceGroupResult>
function getResourceGroupOutput(args: GetResourceGroupOutputArgs, opts?: InvokeOptions): Output<GetResourceGroupResult>
Copy
def get_resource_group(id: Optional[str] = None,
                       name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetResourceGroupResult
def get_resource_group_output(id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetResourceGroupResult]
Copy
func LookupResourceGroup(ctx *Context, args *LookupResourceGroupArgs, opts ...InvokeOption) (*LookupResourceGroupResult, error)
func LookupResourceGroupOutput(ctx *Context, args *LookupResourceGroupOutputArgs, opts ...InvokeOption) LookupResourceGroupResultOutput
Copy

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

public static class GetResourceGroup 
{
    public static Task<GetResourceGroupResult> InvokeAsync(GetResourceGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetResourceGroupResult> Invoke(GetResourceGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetResourceGroupResult> getResourceGroup(GetResourceGroupArgs args, InvokeOptions options)
public static Output<GetResourceGroupResult> getResourceGroup(GetResourceGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: redpanda:index/getResourceGroup:getResourceGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
UUID of the resource group
Name string
Name of the resource group
Id string
UUID of the resource group
Name string
Name of the resource group
id String
UUID of the resource group
name String
Name of the resource group
id string
UUID of the resource group
name string
Name of the resource group
id str
UUID of the resource group
name str
Name of the resource group
id String
UUID of the resource group
name String
Name of the resource group

getResourceGroup Result

The following output properties are available:

Id string
UUID of the resource group
Name string
Name of the resource group
Id string
UUID of the resource group
Name string
Name of the resource group
id String
UUID of the resource group
name String
Name of the resource group
id string
UUID of the resource group
name string
Name of the resource group
id str
UUID of the resource group
name str
Name of the resource group
id String
UUID of the resource group
name String
Name of the resource group

Package Details

Repository
redpanda redpanda-data/terraform-provider-redpanda
License
Notes
This Pulumi package is based on the redpanda Terraform Provider.