scaleway.CockpitGrafanaUser
Explore with Pulumi AI
Creates and manages Scaleway Cockpit Grafana Users.
For more information consult the documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const project = new scaleway.AccountProject("project", {});
const main = new scaleway.CockpitGrafanaUser("main", {
projectId: project.id,
login: "my-awesome-user",
role: "editor",
});
import pulumi
import pulumiverse_scaleway as scaleway
project = scaleway.AccountProject("project")
main = scaleway.CockpitGrafanaUser("main",
project_id=project.id,
login="my-awesome-user",
role="editor")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := scaleway.NewAccountProject(ctx, "project", nil)
if err != nil {
return err
}
_, err = scaleway.NewCockpitGrafanaUser(ctx, "main", &scaleway.CockpitGrafanaUserArgs{
ProjectId: project.ID(),
Login: pulumi.String("my-awesome-user"),
Role: pulumi.String("editor"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var project = new Scaleway.AccountProject("project");
var main = new Scaleway.CockpitGrafanaUser("main", new()
{
ProjectId = project.Id,
Login = "my-awesome-user",
Role = "editor",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.AccountProject;
import com.pulumi.scaleway.CockpitGrafanaUser;
import com.pulumi.scaleway.CockpitGrafanaUserArgs;
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 project = new AccountProject("project");
var main = new CockpitGrafanaUser("main", CockpitGrafanaUserArgs.builder()
.projectId(project.id())
.login("my-awesome-user")
.role("editor")
.build());
}
}
resources:
project:
type: scaleway:AccountProject
main:
type: scaleway:CockpitGrafanaUser
properties:
projectId: ${project.id}
login: my-awesome-user
role: editor
Create CockpitGrafanaUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CockpitGrafanaUser(name: string, args: CockpitGrafanaUserArgs, opts?: CustomResourceOptions);
@overload
def CockpitGrafanaUser(resource_name: str,
args: CockpitGrafanaUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CockpitGrafanaUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
login: Optional[str] = None,
role: Optional[str] = None,
project_id: Optional[str] = None)
func NewCockpitGrafanaUser(ctx *Context, name string, args CockpitGrafanaUserArgs, opts ...ResourceOption) (*CockpitGrafanaUser, error)
public CockpitGrafanaUser(string name, CockpitGrafanaUserArgs args, CustomResourceOptions? opts = null)
public CockpitGrafanaUser(String name, CockpitGrafanaUserArgs args)
public CockpitGrafanaUser(String name, CockpitGrafanaUserArgs args, CustomResourceOptions options)
type: scaleway:CockpitGrafanaUser
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 CockpitGrafanaUserArgs
- 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 CockpitGrafanaUserArgs
- 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 CockpitGrafanaUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CockpitGrafanaUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CockpitGrafanaUserArgs
- 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 cockpitGrafanaUserResource = new Scaleway.CockpitGrafanaUser("cockpitGrafanaUserResource", new()
{
Login = "string",
Role = "string",
ProjectId = "string",
});
example, err := scaleway.NewCockpitGrafanaUser(ctx, "cockpitGrafanaUserResource", &scaleway.CockpitGrafanaUserArgs{
Login: pulumi.String("string"),
Role: pulumi.String("string"),
ProjectId: pulumi.String("string"),
})
var cockpitGrafanaUserResource = new CockpitGrafanaUser("cockpitGrafanaUserResource", CockpitGrafanaUserArgs.builder()
.login("string")
.role("string")
.projectId("string")
.build());
cockpit_grafana_user_resource = scaleway.CockpitGrafanaUser("cockpitGrafanaUserResource",
login="string",
role="string",
project_id="string")
const cockpitGrafanaUserResource = new scaleway.CockpitGrafanaUser("cockpitGrafanaUserResource", {
login: "string",
role: "string",
projectId: "string",
});
type: scaleway:CockpitGrafanaUser
properties:
login: string
projectId: string
role: string
CockpitGrafanaUser Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CockpitGrafanaUser resource accepts the following input properties:
- login str
- The login of the grafana user.
- role str
- The role of the grafana user. Must be
editor
orviewer
. - project_
id str project_id
) The ID of the project the cockpit is associated with.
Outputs
All input properties are implicitly available as output properties. Additionally, the CockpitGrafanaUser resource produces the following output properties:
Look up Existing CockpitGrafanaUser Resource
Get an existing CockpitGrafanaUser 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?: CockpitGrafanaUserState, opts?: CustomResourceOptions): CockpitGrafanaUser
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
login: Optional[str] = None,
password: Optional[str] = None,
project_id: Optional[str] = None,
role: Optional[str] = None) -> CockpitGrafanaUser
func GetCockpitGrafanaUser(ctx *Context, name string, id IDInput, state *CockpitGrafanaUserState, opts ...ResourceOption) (*CockpitGrafanaUser, error)
public static CockpitGrafanaUser Get(string name, Input<string> id, CockpitGrafanaUserState? state, CustomResourceOptions? opts = null)
public static CockpitGrafanaUser get(String name, Output<String> id, CockpitGrafanaUserState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- login str
- The login of the grafana user.
- password str
- The password of the grafana user
- project_
id str project_id
) The ID of the project the cockpit is associated with.- role str
- The role of the grafana user. Must be
editor
orviewer
.
Import
Cockpits Grafana Users can be imported using the project ID and the grafana user ID formatted {project_id}/{grafana_user_id}
, e.g.
bash
$ pulumi import scaleway:index/cockpitGrafanaUser:CockpitGrafanaUser main 11111111-1111-1111-1111-111111111111/2
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.