1. Packages
  2. Grafana Cloud
  3. API Docs
  4. CloudStackServiceAccount
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

grafana.CloudStackServiceAccount

Explore with Pulumi AI

grafana logo
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

    Manages service accounts of a Grafana Cloud stack using the Cloud API This can be used to bootstrap a management service account for a new stack

    Required access policy scopes:

    • stacks:read
    • stack-service-accounts:write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const cloudSa = new grafana.CloudStackServiceAccount("cloudSa", {
        isDisabled: false,
        role: "Admin",
        stackSlug: "<your stack slug>",
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    cloud_sa = grafana.CloudStackServiceAccount("cloudSa",
        is_disabled=False,
        role="Admin",
        stack_slug="<your stack slug>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := grafana.NewCloudStackServiceAccount(ctx, "cloudSa", &grafana.CloudStackServiceAccountArgs{
    			IsDisabled: pulumi.Bool(false),
    			Role:       pulumi.String("Admin"),
    			StackSlug:  pulumi.String("<your stack slug>"),
    		})
    		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 cloudSa = new Grafana.CloudStackServiceAccount("cloudSa", new()
        {
            IsDisabled = false,
            Role = "Admin",
            StackSlug = "<your stack slug>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.CloudStackServiceAccount;
    import com.pulumi.grafana.CloudStackServiceAccountArgs;
    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 cloudSa = new CloudStackServiceAccount("cloudSa", CloudStackServiceAccountArgs.builder()        
                .isDisabled(false)
                .role("Admin")
                .stackSlug("<your stack slug>")
                .build());
    
        }
    }
    
    resources:
      cloudSa:
        type: grafana:CloudStackServiceAccount
        properties:
          isDisabled: false
          role: Admin
          stackSlug: <your stack slug>
    

    Create CloudStackServiceAccount Resource

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

    Constructor syntax

    new CloudStackServiceAccount(name: string, args: CloudStackServiceAccountArgs, opts?: CustomResourceOptions);
    @overload
    def CloudStackServiceAccount(resource_name: str,
                                 args: CloudStackServiceAccountArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudStackServiceAccount(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 role: Optional[str] = None,
                                 stack_slug: Optional[str] = None,
                                 is_disabled: Optional[bool] = None,
                                 name: Optional[str] = None)
    func NewCloudStackServiceAccount(ctx *Context, name string, args CloudStackServiceAccountArgs, opts ...ResourceOption) (*CloudStackServiceAccount, error)
    public CloudStackServiceAccount(string name, CloudStackServiceAccountArgs args, CustomResourceOptions? opts = null)
    public CloudStackServiceAccount(String name, CloudStackServiceAccountArgs args)
    public CloudStackServiceAccount(String name, CloudStackServiceAccountArgs args, CustomResourceOptions options)
    
    type: grafana:CloudStackServiceAccount
    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 CloudStackServiceAccountArgs
    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 CloudStackServiceAccountArgs
    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 CloudStackServiceAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudStackServiceAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudStackServiceAccountArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var cloudStackServiceAccountResource = new Grafana.CloudStackServiceAccount("cloudStackServiceAccountResource", new()
    {
        Role = "string",
        StackSlug = "string",
        IsDisabled = false,
        Name = "string",
    });
    
    example, err := grafana.NewCloudStackServiceAccount(ctx, "cloudStackServiceAccountResource", &grafana.CloudStackServiceAccountArgs{
    	Role:       pulumi.String("string"),
    	StackSlug:  pulumi.String("string"),
    	IsDisabled: pulumi.Bool(false),
    	Name:       pulumi.String("string"),
    })
    
    var cloudStackServiceAccountResource = new CloudStackServiceAccount("cloudStackServiceAccountResource", CloudStackServiceAccountArgs.builder()
        .role("string")
        .stackSlug("string")
        .isDisabled(false)
        .name("string")
        .build());
    
    cloud_stack_service_account_resource = grafana.CloudStackServiceAccount("cloudStackServiceAccountResource",
        role="string",
        stack_slug="string",
        is_disabled=False,
        name="string")
    
    const cloudStackServiceAccountResource = new grafana.CloudStackServiceAccount("cloudStackServiceAccountResource", {
        role: "string",
        stackSlug: "string",
        isDisabled: false,
        name: "string",
    });
    
    type: grafana:CloudStackServiceAccount
    properties:
        isDisabled: false
        name: string
        role: string
        stackSlug: string
    

    CloudStackServiceAccount 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 CloudStackServiceAccount resource accepts the following input properties:

    Role string
    The basic role of the service account in the organization.
    StackSlug string
    IsDisabled bool
    The disabled status for the service account. Defaults to false.
    Name string
    The name of the service account.
    Role string
    The basic role of the service account in the organization.
    StackSlug string
    IsDisabled bool
    The disabled status for the service account. Defaults to false.
    Name string
    The name of the service account.
    role String
    The basic role of the service account in the organization.
    stackSlug String
    isDisabled Boolean
    The disabled status for the service account. Defaults to false.
    name String
    The name of the service account.
    role string
    The basic role of the service account in the organization.
    stackSlug string
    isDisabled boolean
    The disabled status for the service account. Defaults to false.
    name string
    The name of the service account.
    role str
    The basic role of the service account in the organization.
    stack_slug str
    is_disabled bool
    The disabled status for the service account. Defaults to false.
    name str
    The name of the service account.
    role String
    The basic role of the service account in the organization.
    stackSlug String
    isDisabled Boolean
    The disabled status for the service account. Defaults to false.
    name String
    The name of the service account.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CloudStackServiceAccount 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 CloudStackServiceAccount Resource

    Get an existing CloudStackServiceAccount 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?: CloudStackServiceAccountState, opts?: CustomResourceOptions): CloudStackServiceAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            is_disabled: Optional[bool] = None,
            name: Optional[str] = None,
            role: Optional[str] = None,
            stack_slug: Optional[str] = None) -> CloudStackServiceAccount
    func GetCloudStackServiceAccount(ctx *Context, name string, id IDInput, state *CloudStackServiceAccountState, opts ...ResourceOption) (*CloudStackServiceAccount, error)
    public static CloudStackServiceAccount Get(string name, Input<string> id, CloudStackServiceAccountState? state, CustomResourceOptions? opts = null)
    public static CloudStackServiceAccount get(String name, Output<String> id, CloudStackServiceAccountState 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.
    The following state arguments are supported:
    IsDisabled bool
    The disabled status for the service account. Defaults to false.
    Name string
    The name of the service account.
    Role string
    The basic role of the service account in the organization.
    StackSlug string
    IsDisabled bool
    The disabled status for the service account. Defaults to false.
    Name string
    The name of the service account.
    Role string
    The basic role of the service account in the organization.
    StackSlug string
    isDisabled Boolean
    The disabled status for the service account. Defaults to false.
    name String
    The name of the service account.
    role String
    The basic role of the service account in the organization.
    stackSlug String
    isDisabled boolean
    The disabled status for the service account. Defaults to false.
    name string
    The name of the service account.
    role string
    The basic role of the service account in the organization.
    stackSlug string
    is_disabled bool
    The disabled status for the service account. Defaults to false.
    name str
    The name of the service account.
    role str
    The basic role of the service account in the organization.
    stack_slug str
    isDisabled Boolean
    The disabled status for the service account. Defaults to false.
    name String
    The name of the service account.
    role String
    The basic role of the service account in the organization.
    stackSlug String

    Import

    $ pulumi import grafana:index/cloudStackServiceAccount:CloudStackServiceAccount name "{{ stackSlug }}:{{ serviceAccountID }}"
    

    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.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse