Viewing docs for Grafana v2.21.0
published on Tuesday, Mar 3, 2026 by pulumiverse
published on Tuesday, Mar 3, 2026 by pulumiverse
Viewing docs for Grafana v2.21.0
published on Tuesday, Mar 3, 2026 by pulumiverse
published on Tuesday, Mar 3, 2026 by pulumiverse
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumiverse/grafana";
const test = grafana.cloud.getStack({
slug: "gcloudstacktest",
});
const testAwsAccount = new grafana.cloudprovider.AwsAccount("test", {
stackId: test.then(test => test.id),
roleArn: testAwsIamRole.arn,
regions: [
"us-east-2",
"eu-west-3",
],
});
const testGetAwsAccount = pulumi.all([test, testAwsAccount.resourceId]).apply(([test, resourceId]) => grafana.cloudProvider.getAwsAccountOutput({
stackId: test.id,
resourceId: resourceId,
}));
import pulumi
import pulumi_grafana as grafana
import pulumiverse_grafana as grafana
test = grafana.cloud.get_stack(slug="gcloudstacktest")
test_aws_account = grafana.cloudprovider.AwsAccount("test",
stack_id=test.id,
role_arn=test_aws_iam_role["arn"],
regions=[
"us-east-2",
"eu-west-3",
])
test_get_aws_account = test_aws_account.resource_id.apply(lambda resource_id: grafana.cloudProvider.get_aws_account(stack_id=test.id,
resource_id=resource_id))
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana/cloud"
"github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana/cloudprovider"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := cloud.LookupStack(ctx, &cloud.LookupStackArgs{
Slug: "gcloudstacktest",
}, nil)
if err != nil {
return err
}
testAwsAccount, err := cloudprovider.NewAwsAccount(ctx, "test", &cloudprovider.AwsAccountArgs{
StackId: pulumi.String(test.Id),
RoleArn: pulumi.Any(testAwsIamRole.Arn),
Regions: pulumi.StringArray{
pulumi.String("us-east-2"),
pulumi.String("eu-west-3"),
},
})
if err != nil {
return err
}
_ = testAwsAccount.ResourceId.ApplyT(func(resourceId string) (cloudprovider.GetAwsAccountResult, error) {
return cloudprovider.GetAwsAccountResult(cloudprovider.GetAwsAccount(ctx, &cloudprovider.GetAwsAccountArgs{
StackId: test.Id,
ResourceId: resourceId,
}, nil)), nil
}).(cloudprovider.GetAwsAccountResultOutput)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumi.Grafana;
using Grafana = Pulumiverse.Grafana;
return await Deployment.RunAsync(() =>
{
var test = Grafana.Cloud.GetStack.Invoke(new()
{
Slug = "gcloudstacktest",
});
var testAwsAccount = new Grafana.CloudProvider.AwsAccount("test", new()
{
StackId = test.Apply(getStackResult => getStackResult.Id),
RoleArn = testAwsIamRole.Arn,
Regions = new[]
{
"us-east-2",
"eu-west-3",
},
});
var testGetAwsAccount = Grafana.CloudProvider.GetAwsAccount.Invoke(new()
{
StackId = test.Apply(getStackResult => getStackResult.Id),
ResourceId = testAwsAccount.ResourceId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.cloud.CloudFunctions;
import com.pulumi.grafana.cloud.inputs.GetStackArgs;
import com.pulumi.grafana.cloudProvider.AwsAccount;
import com.pulumi.grafana.cloudProvider.AwsAccountArgs;
import com.pulumi.grafana.cloudProvider.CloudProviderFunctions;
import com.pulumi.grafana.cloudProvider.inputs.GetAwsAccountArgs;
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 test = CloudFunctions.getStack(GetStackArgs.builder()
.slug("gcloudstacktest")
.build());
var testAwsAccount = new AwsAccount("testAwsAccount", AwsAccountArgs.builder()
.stackId(test.id())
.roleArn(testAwsIamRole.arn())
.regions(
"us-east-2",
"eu-west-3")
.build());
final var testGetAwsAccount = testAwsAccount.resourceId().applyValue(_resourceId -> CloudProviderFunctions.getAwsAccount(GetAwsAccountArgs.builder()
.stackId(test.id())
.resourceId(_resourceId)
.build()));
}
}
resources:
testAwsAccount:
type: grafana:cloudProvider:AwsAccount
name: test
properties:
stackId: ${test.id}
roleArn: ${testAwsIamRole.arn}
regions:
- us-east-2
- eu-west-3
variables:
test:
fn::invoke:
function: grafana:cloud:getStack
arguments:
slug: gcloudstacktest
testGetAwsAccount:
fn::invoke:
function: grafana:cloudProvider:getAwsAccount
arguments:
stackId: ${test.id}
resourceId: ${testAwsAccount.resourceId}
Using getAwsAccount
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 getAwsAccount(args: GetAwsAccountArgs, opts?: InvokeOptions): Promise<GetAwsAccountResult>
function getAwsAccountOutput(args: GetAwsAccountOutputArgs, opts?: InvokeOptions): Output<GetAwsAccountResult>def get_aws_account(resource_id: Optional[str] = None,
stack_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAwsAccountResult
def get_aws_account_output(resource_id: Optional[pulumi.Input[str]] = None,
stack_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAwsAccountResult]func LookupAwsAccount(ctx *Context, args *LookupAwsAccountArgs, opts ...InvokeOption) (*LookupAwsAccountResult, error)
func LookupAwsAccountOutput(ctx *Context, args *LookupAwsAccountOutputArgs, opts ...InvokeOption) LookupAwsAccountResultOutput> Note: This function is named LookupAwsAccount in the Go SDK.
public static class GetAwsAccount
{
public static Task<GetAwsAccountResult> InvokeAsync(GetAwsAccountArgs args, InvokeOptions? opts = null)
public static Output<GetAwsAccountResult> Invoke(GetAwsAccountInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAwsAccountResult> getAwsAccount(GetAwsAccountArgs args, InvokeOptions options)
public static Output<GetAwsAccountResult> getAwsAccount(GetAwsAccountArgs args, InvokeOptions options)
fn::invoke:
function: grafana:cloudProvider/getAwsAccount:getAwsAccount
arguments:
# arguments dictionaryThe following arguments are supported:
- Resource
Id string - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- Stack
Id string
- Resource
Id string - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- Stack
Id string
- resource
Id String - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- stack
Id String
- resource
Id string - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- stack
Id string
- resource_
id str - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- stack_
id str
- resource
Id String - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- stack
Id String
getAwsAccount Result
The following output properties are available:
- Id string
- Name string
- An optional human-readable name for this AWS Account resource.
- Regions List<string>
- A set of regions that this AWS Account resource applies to.
- Resource
Id string - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- Role
Arn string - An IAM Role ARN string to represent with this AWS Account resource.
- Stack
Id string
- Id string
- Name string
- An optional human-readable name for this AWS Account resource.
- Regions []string
- A set of regions that this AWS Account resource applies to.
- Resource
Id string - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- Role
Arn string - An IAM Role ARN string to represent with this AWS Account resource.
- Stack
Id string
- id String
- name String
- An optional human-readable name for this AWS Account resource.
- regions List<String>
- A set of regions that this AWS Account resource applies to.
- resource
Id String - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- role
Arn String - An IAM Role ARN string to represent with this AWS Account resource.
- stack
Id String
- id string
- name string
- An optional human-readable name for this AWS Account resource.
- regions string[]
- A set of regions that this AWS Account resource applies to.
- resource
Id string - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- role
Arn string - An IAM Role ARN string to represent with this AWS Account resource.
- stack
Id string
- id str
- name str
- An optional human-readable name for this AWS Account resource.
- regions Sequence[str]
- A set of regions that this AWS Account resource applies to.
- resource_
id str - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- role_
arn str - An IAM Role ARN string to represent with this AWS Account resource.
- stack_
id str
- id String
- name String
- An optional human-readable name for this AWS Account resource.
- regions List<String>
- A set of regions that this AWS Account resource applies to.
- resource
Id String - The ID given by the Grafana Cloud Provider API to this AWS Account resource.
- role
Arn String - An IAM Role ARN string to represent with this AWS Account resource.
- stack
Id String
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafanaTerraform Provider.
Viewing docs for Grafana v2.21.0
published on Tuesday, Mar 3, 2026 by pulumiverse
published on Tuesday, Mar 3, 2026 by pulumiverse
