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

grafana.k6.ProjectLimits

Explore with Pulumi AI

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

    Manages limits for a k6 project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const testProjectLimits = new grafana.k6.Project("test_project_limits", {name: "Terraform Project Test Limits"});
    const testLimits = new grafana.k6.ProjectLimits("test_limits", {
        projectId: testProjectLimits.id,
        vuhMaxPerMonth: 1000,
        vuMaxPerTest: 100,
        vuBrowserMaxPerTest: 10,
        durationMaxPerTest: 3600,
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    test_project_limits = grafana.k6.Project("test_project_limits", name="Terraform Project Test Limits")
    test_limits = grafana.k6.ProjectLimits("test_limits",
        project_id=test_project_limits.id,
        vuh_max_per_month=1000,
        vu_max_per_test=100,
        vu_browser_max_per_test=10,
        duration_max_per_test=3600)
    
    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 {
    		testProjectLimits, err := k6.NewProject(ctx, "test_project_limits", &k6.ProjectArgs{
    			Name: pulumi.String("Terraform Project Test Limits"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = k6.NewProjectLimits(ctx, "test_limits", &k6.ProjectLimitsArgs{
    			ProjectId:           testProjectLimits.ID(),
    			VuhMaxPerMonth:      pulumi.Int(1000),
    			VuMaxPerTest:        pulumi.Int(100),
    			VuBrowserMaxPerTest: pulumi.Int(10),
    			DurationMaxPerTest:  pulumi.Int(3600),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var testProjectLimits = new Grafana.K6.Project("test_project_limits", new()
        {
            Name = "Terraform Project Test Limits",
        });
    
        var testLimits = new Grafana.K6.ProjectLimits("test_limits", new()
        {
            ProjectId = testProjectLimits.Id,
            VuhMaxPerMonth = 1000,
            VuMaxPerTest = 100,
            VuBrowserMaxPerTest = 10,
            DurationMaxPerTest = 3600,
        });
    
    });
    
    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.ProjectLimits;
    import com.pulumi.grafana.k6.ProjectLimitsArgs;
    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 testProjectLimits = new Project("testProjectLimits", ProjectArgs.builder()
                .name("Terraform Project Test Limits")
                .build());
    
            var testLimits = new ProjectLimits("testLimits", ProjectLimitsArgs.builder()
                .projectId(testProjectLimits.id())
                .vuhMaxPerMonth(1000)
                .vuMaxPerTest(100)
                .vuBrowserMaxPerTest(10)
                .durationMaxPerTest(3600)
                .build());
    
        }
    }
    
    resources:
      testProjectLimits:
        type: grafana:k6:Project
        name: test_project_limits
        properties:
          name: Terraform Project Test Limits
      testLimits:
        type: grafana:k6:ProjectLimits
        name: test_limits
        properties:
          projectId: ${testProjectLimits.id}
          vuhMaxPerMonth: 1000
          vuMaxPerTest: 100
          vuBrowserMaxPerTest: 10
          durationMaxPerTest: 3600
    

    Create ProjectLimits Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ProjectLimits(name: string, args: ProjectLimitsArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectLimits(resource_name: str,
                      args: ProjectLimitsArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectLimits(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      project_id: Optional[str] = None,
                      duration_max_per_test: Optional[int] = None,
                      vu_browser_max_per_test: Optional[int] = None,
                      vu_max_per_test: Optional[int] = None,
                      vuh_max_per_month: Optional[int] = None)
    func NewProjectLimits(ctx *Context, name string, args ProjectLimitsArgs, opts ...ResourceOption) (*ProjectLimits, error)
    public ProjectLimits(string name, ProjectLimitsArgs args, CustomResourceOptions? opts = null)
    public ProjectLimits(String name, ProjectLimitsArgs args)
    public ProjectLimits(String name, ProjectLimitsArgs args, CustomResourceOptions options)
    
    type: grafana:k6:ProjectLimits
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ProjectLimitsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProjectLimitsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProjectLimitsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectLimitsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectLimitsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var projectLimitsResource = new Grafana.K6.ProjectLimits("projectLimitsResource", new()
    {
        ProjectId = "string",
        DurationMaxPerTest = 0,
        VuBrowserMaxPerTest = 0,
        VuMaxPerTest = 0,
        VuhMaxPerMonth = 0,
    });
    
    example, err := k6.NewProjectLimits(ctx, "projectLimitsResource", &k6.ProjectLimitsArgs{
    	ProjectId:           pulumi.String("string"),
    	DurationMaxPerTest:  pulumi.Int(0),
    	VuBrowserMaxPerTest: pulumi.Int(0),
    	VuMaxPerTest:        pulumi.Int(0),
    	VuhMaxPerMonth:      pulumi.Int(0),
    })
    
    var projectLimitsResource = new ProjectLimits("projectLimitsResource", ProjectLimitsArgs.builder()
        .projectId("string")
        .durationMaxPerTest(0)
        .vuBrowserMaxPerTest(0)
        .vuMaxPerTest(0)
        .vuhMaxPerMonth(0)
        .build());
    
    project_limits_resource = grafana.k6.ProjectLimits("projectLimitsResource",
        project_id="string",
        duration_max_per_test=0,
        vu_browser_max_per_test=0,
        vu_max_per_test=0,
        vuh_max_per_month=0)
    
    const projectLimitsResource = new grafana.k6.ProjectLimits("projectLimitsResource", {
        projectId: "string",
        durationMaxPerTest: 0,
        vuBrowserMaxPerTest: 0,
        vuMaxPerTest: 0,
        vuhMaxPerMonth: 0,
    });
    
    type: grafana:k6:ProjectLimits
    properties:
        durationMaxPerTest: 0
        projectId: string
        vuBrowserMaxPerTest: 0
        vuMaxPerTest: 0
        vuhMaxPerMonth: 0
    

    ProjectLimits Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ProjectLimits resource accepts the following input properties:

    ProjectId string
    The identifier of the project to manage limits for.
    DurationMaxPerTest int
    Maximum duration of a test in seconds.
    VuBrowserMaxPerTest int
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    VuMaxPerTest int
    Maximum number of concurrent virtual users (VUs) used in one test.
    VuhMaxPerMonth int
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    ProjectId string
    The identifier of the project to manage limits for.
    DurationMaxPerTest int
    Maximum duration of a test in seconds.
    VuBrowserMaxPerTest int
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    VuMaxPerTest int
    Maximum number of concurrent virtual users (VUs) used in one test.
    VuhMaxPerMonth int
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    projectId String
    The identifier of the project to manage limits for.
    durationMaxPerTest Integer
    Maximum duration of a test in seconds.
    vuBrowserMaxPerTest Integer
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    vuMaxPerTest Integer
    Maximum number of concurrent virtual users (VUs) used in one test.
    vuhMaxPerMonth Integer
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    projectId string
    The identifier of the project to manage limits for.
    durationMaxPerTest number
    Maximum duration of a test in seconds.
    vuBrowserMaxPerTest number
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    vuMaxPerTest number
    Maximum number of concurrent virtual users (VUs) used in one test.
    vuhMaxPerMonth number
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    project_id str
    The identifier of the project to manage limits for.
    duration_max_per_test int
    Maximum duration of a test in seconds.
    vu_browser_max_per_test int
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    vu_max_per_test int
    Maximum number of concurrent virtual users (VUs) used in one test.
    vuh_max_per_month int
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    projectId String
    The identifier of the project to manage limits for.
    durationMaxPerTest Number
    Maximum duration of a test in seconds.
    vuBrowserMaxPerTest Number
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    vuMaxPerTest Number
    Maximum number of concurrent virtual users (VUs) used in one test.
    vuhMaxPerMonth Number
    Maximum amount of virtual user hours (VU/h) used per one calendar month.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProjectLimits resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ProjectLimits Resource

    Get an existing ProjectLimits resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ProjectLimitsState, opts?: CustomResourceOptions): ProjectLimits
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            duration_max_per_test: Optional[int] = None,
            project_id: Optional[str] = None,
            vu_browser_max_per_test: Optional[int] = None,
            vu_max_per_test: Optional[int] = None,
            vuh_max_per_month: Optional[int] = None) -> ProjectLimits
    func GetProjectLimits(ctx *Context, name string, id IDInput, state *ProjectLimitsState, opts ...ResourceOption) (*ProjectLimits, error)
    public static ProjectLimits Get(string name, Input<string> id, ProjectLimitsState? state, CustomResourceOptions? opts = null)
    public static ProjectLimits get(String name, Output<String> id, ProjectLimitsState state, CustomResourceOptions options)
    resources:  _:    type: grafana:k6:ProjectLimits    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DurationMaxPerTest int
    Maximum duration of a test in seconds.
    ProjectId string
    The identifier of the project to manage limits for.
    VuBrowserMaxPerTest int
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    VuMaxPerTest int
    Maximum number of concurrent virtual users (VUs) used in one test.
    VuhMaxPerMonth int
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    DurationMaxPerTest int
    Maximum duration of a test in seconds.
    ProjectId string
    The identifier of the project to manage limits for.
    VuBrowserMaxPerTest int
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    VuMaxPerTest int
    Maximum number of concurrent virtual users (VUs) used in one test.
    VuhMaxPerMonth int
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    durationMaxPerTest Integer
    Maximum duration of a test in seconds.
    projectId String
    The identifier of the project to manage limits for.
    vuBrowserMaxPerTest Integer
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    vuMaxPerTest Integer
    Maximum number of concurrent virtual users (VUs) used in one test.
    vuhMaxPerMonth Integer
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    durationMaxPerTest number
    Maximum duration of a test in seconds.
    projectId string
    The identifier of the project to manage limits for.
    vuBrowserMaxPerTest number
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    vuMaxPerTest number
    Maximum number of concurrent virtual users (VUs) used in one test.
    vuhMaxPerMonth number
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    duration_max_per_test int
    Maximum duration of a test in seconds.
    project_id str
    The identifier of the project to manage limits for.
    vu_browser_max_per_test int
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    vu_max_per_test int
    Maximum number of concurrent virtual users (VUs) used in one test.
    vuh_max_per_month int
    Maximum amount of virtual user hours (VU/h) used per one calendar month.
    durationMaxPerTest Number
    Maximum duration of a test in seconds.
    projectId String
    The identifier of the project to manage limits for.
    vuBrowserMaxPerTest Number
    Maximum number of concurrent browser virtual users (VUs) used in one test.
    vuMaxPerTest Number
    Maximum number of concurrent virtual users (VUs) used in one test.
    vuhMaxPerMonth Number
    Maximum amount of virtual user hours (VU/h) used per one calendar month.

    Import

    $ pulumi import grafana:k6/projectLimits:ProjectLimits name "{{ project_id }}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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