1. Packages
  2. Grafana Cloud
  3. API Docs
  4. k6
  5. getProject
Grafana v0.19.2 published on Friday, Jul 18, 2025 by pulumiverse

grafana.k6.getProject

Explore with Pulumi AI

grafana logo
Grafana v0.19.2 published on Friday, Jul 18, 2025 by pulumiverse

    Retrieves a k6 project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const test = new grafana.k6.Project("test", {name: "Terraform Test Project"});
    const fromId = grafana.k6.getProjectOutput({
        id: test.id,
    });
    
    import pulumi
    import pulumi_grafana as grafana
    import pulumiverse_grafana as grafana
    
    test = grafana.k6.Project("test", name="Terraform Test Project")
    from_id = grafana.k6.get_project_output(id=test.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/k6"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := k6.NewProject(ctx, "test", &k6.ProjectArgs{
    			Name: pulumi.String("Terraform Test Project"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = k6.LookupProjectOutput(ctx, k6.GetProjectOutputArgs{
    			Id: test.ID(),
    		}, nil)
    		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 = new Grafana.K6.Project("test", new()
        {
            Name = "Terraform Test Project",
        });
    
        var fromId = Grafana.K6.GetProject.Invoke(new()
        {
            Id = test.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.k6.Project;
    import com.pulumi.grafana.k6.ProjectArgs;
    import com.pulumi.grafana.k6.K6Functions;
    import com.pulumi.grafana.k6.inputs.GetProjectArgs;
    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) {
            var test = new Project("test", ProjectArgs.builder()
                .name("Terraform Test Project")
                .build());
    
            final var fromId = K6Functions.getProject(GetProjectArgs.builder()
                .id(test.id())
                .build());
    
        }
    }
    
    resources:
      test:
        type: grafana:k6:Project
        properties:
          name: Terraform Test Project
    variables:
      fromId:
        fn::invoke:
          function: grafana:k6:getProject
          arguments:
            id: ${test.id}
    

    Using getProject

    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 getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
    function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>
    def get_project(id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetProjectResult
    def get_project_output(id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]
    func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
    func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput

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

    public static class GetProject 
    {
        public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
    public static Output<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: grafana:k6/getProject:getProject
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Numeric identifier of the project.
    Id string
    Numeric identifier of the project.
    id String
    Numeric identifier of the project.
    id string
    Numeric identifier of the project.
    id str
    Numeric identifier of the project.
    id String
    Numeric identifier of the project.

    getProject Result

    The following output properties are available:

    Created string
    The date when the project was created.
    GrafanaFolderUid string
    The Grafana folder uid.
    Id string
    Numeric identifier of the project.
    IsDefault bool
    Whether this project is the default for running tests when no explicit project identifier is provided.
    Name string
    Human-friendly identifier of the project.
    Updated string
    The date when the project was last updated.
    Created string
    The date when the project was created.
    GrafanaFolderUid string
    The Grafana folder uid.
    Id string
    Numeric identifier of the project.
    IsDefault bool
    Whether this project is the default for running tests when no explicit project identifier is provided.
    Name string
    Human-friendly identifier of the project.
    Updated string
    The date when the project was last updated.
    created String
    The date when the project was created.
    grafanaFolderUid String
    The Grafana folder uid.
    id String
    Numeric identifier of the project.
    isDefault Boolean
    Whether this project is the default for running tests when no explicit project identifier is provided.
    name String
    Human-friendly identifier of the project.
    updated String
    The date when the project was last updated.
    created string
    The date when the project was created.
    grafanaFolderUid string
    The Grafana folder uid.
    id string
    Numeric identifier of the project.
    isDefault boolean
    Whether this project is the default for running tests when no explicit project identifier is provided.
    name string
    Human-friendly identifier of the project.
    updated string
    The date when the project was last updated.
    created str
    The date when the project was created.
    grafana_folder_uid str
    The Grafana folder uid.
    id str
    Numeric identifier of the project.
    is_default bool
    Whether this project is the default for running tests when no explicit project identifier is provided.
    name str
    Human-friendly identifier of the project.
    updated str
    The date when the project was last updated.
    created String
    The date when the project was created.
    grafanaFolderUid String
    The Grafana folder uid.
    id String
    Numeric identifier of the project.
    isDefault Boolean
    Whether this project is the default for running tests when no explicit project identifier is provided.
    name String
    Human-friendly identifier of the project.
    updated String
    The date when the project was last updated.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.19.2 published on Friday, Jul 18, 2025 by pulumiverse