1. Packages
  2. Grafana Cloud
  3. API Docs
  4. CloudStackServiceAccount
Grafana v0.7.1 published on Monday, Nov 25, 2024 by pulumiverse

grafana.CloudStackServiceAccount

Explore with Pulumi AI

grafana logo
Grafana v0.7.1 published on Monday, Nov 25, 2024 by pulumiverse
    Deprecated: grafana.index/cloudstackserviceaccount.CloudStackServiceAccount has been deprecated in favor of grafana.cloud/stackserviceaccount.StackServiceAccount

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

    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,
                                 is_disabled: Optional[bool] = None,
                                 name: Optional[str] = None,
                                 role: Optional[str] = None,
                                 stack_slug: 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.

    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

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

    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.7.1 published on Monday, Nov 25, 2024 by pulumiverse