1. Packages
  2. Doppler
  3. API Docs
  4. projectMember
  5. ServiceAccount
Doppler v0.7.1 published on Monday, May 27, 2024 by Pulumiverse

doppler.projectMember.ServiceAccount

Explore with Pulumi AI

doppler logo
Doppler v0.7.1 published on Monday, May 27, 2024 by Pulumiverse

    Manage a Doppler project service account member.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as doppler from "@pulumiverse/doppler";
    
    const backendCi = new doppler.projectmember.ServiceAccount("backend_ci", {
        project: "backend",
        serviceAccountSlug: ci.slug,
        role: "viewer",
        environments: [
            "dev",
            "stg",
            "prd",
        ],
    });
    
    import pulumi
    import pulumiverse_doppler as doppler
    
    backend_ci = doppler.project_member.ServiceAccount("backend_ci",
        project="backend",
        service_account_slug=ci["slug"],
        role="viewer",
        environments=[
            "dev",
            "stg",
            "prd",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-doppler/sdk/go/doppler/projectMember"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := projectMember.NewServiceAccount(ctx, "backend_ci", &projectMember.ServiceAccountArgs{
    			Project:            pulumi.String("backend"),
    			ServiceAccountSlug: pulumi.Any(ci.Slug),
    			Role:               pulumi.String("viewer"),
    			Environments: pulumi.StringArray{
    				pulumi.String("dev"),
    				pulumi.String("stg"),
    				pulumi.String("prd"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Doppler = Pulumiverse.Doppler;
    
    return await Deployment.RunAsync(() => 
    {
        var backendCi = new Doppler.ProjectMember.ServiceAccount("backend_ci", new()
        {
            Project = "backend",
            ServiceAccountSlug = ci.Slug,
            Role = "viewer",
            Environments = new[]
            {
                "dev",
                "stg",
                "prd",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.doppler.projectMember.ServiceAccount;
    import com.pulumi.doppler.projectMember.ServiceAccountArgs;
    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 backendCi = new ServiceAccount("backendCi", ServiceAccountArgs.builder()
                .project("backend")
                .serviceAccountSlug(ci.slug())
                .role("viewer")
                .environments(            
                    "dev",
                    "stg",
                    "prd")
                .build());
    
        }
    }
    
    resources:
      backendCi:
        type: doppler:projectMember:ServiceAccount
        name: backend_ci
        properties:
          project: backend
          serviceAccountSlug: ${ci.slug}
          role: viewer
          environments:
            - dev
            - stg
            - prd
    

    Create ServiceAccount Resource

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

    Constructor syntax

    new ServiceAccount(name: string, args: ServiceAccountArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceAccount(resource_name: str,
                       args: ServiceAccountArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceAccount(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       project: Optional[str] = None,
                       role: Optional[str] = None,
                       service_account_slug: Optional[str] = None,
                       environments: Optional[Sequence[str]] = None)
    func NewServiceAccount(ctx *Context, name string, args ServiceAccountArgs, opts ...ResourceOption) (*ServiceAccount, error)
    public ServiceAccount(string name, ServiceAccountArgs args, CustomResourceOptions? opts = null)
    public ServiceAccount(String name, ServiceAccountArgs args)
    public ServiceAccount(String name, ServiceAccountArgs args, CustomResourceOptions options)
    
    type: doppler:projectMember:ServiceAccount
    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 ServiceAccountArgs
    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 ServiceAccountArgs
    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 ServiceAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceAccountArgs
    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 dopplerServiceAccountResource = new Doppler.ProjectMember.ServiceAccount("dopplerServiceAccountResource", new()
    {
        Project = "string",
        Role = "string",
        ServiceAccountSlug = "string",
        Environments = new[]
        {
            "string",
        },
    });
    
    example, err := projectMember.NewServiceAccount(ctx, "dopplerServiceAccountResource", &projectMember.ServiceAccountArgs{
    	Project:            pulumi.String("string"),
    	Role:               pulumi.String("string"),
    	ServiceAccountSlug: pulumi.String("string"),
    	Environments: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var dopplerServiceAccountResource = new ServiceAccount("dopplerServiceAccountResource", ServiceAccountArgs.builder()
        .project("string")
        .role("string")
        .serviceAccountSlug("string")
        .environments("string")
        .build());
    
    doppler_service_account_resource = doppler.project_member.ServiceAccount("dopplerServiceAccountResource",
        project="string",
        role="string",
        service_account_slug="string",
        environments=["string"])
    
    const dopplerServiceAccountResource = new doppler.projectmember.ServiceAccount("dopplerServiceAccountResource", {
        project: "string",
        role: "string",
        serviceAccountSlug: "string",
        environments: ["string"],
    });
    
    type: doppler:projectMember:ServiceAccount
    properties:
        environments:
            - string
        project: string
        role: string
        serviceAccountSlug: string
    

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

    Project string
    The name of the Doppler project where the access is applied
    Role string
    The project role identifier for the access
    ServiceAccountSlug string
    The slug of the Doppler service account
    Environments List<string>
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    Project string
    The name of the Doppler project where the access is applied
    Role string
    The project role identifier for the access
    ServiceAccountSlug string
    The slug of the Doppler service account
    Environments []string
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    project String
    The name of the Doppler project where the access is applied
    role String
    The project role identifier for the access
    serviceAccountSlug String
    The slug of the Doppler service account
    environments List<String>
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    project string
    The name of the Doppler project where the access is applied
    role string
    The project role identifier for the access
    serviceAccountSlug string
    The slug of the Doppler service account
    environments string[]
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    project str
    The name of the Doppler project where the access is applied
    role str
    The project role identifier for the access
    service_account_slug str
    The slug of the Doppler service account
    environments Sequence[str]
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    project String
    The name of the Doppler project where the access is applied
    role String
    The project role identifier for the access
    serviceAccountSlug String
    The slug of the Doppler service account
    environments List<String>
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)

    Outputs

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

    Get an existing ServiceAccount 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?: ServiceAccountState, opts?: CustomResourceOptions): ServiceAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            environments: Optional[Sequence[str]] = None,
            project: Optional[str] = None,
            role: Optional[str] = None,
            service_account_slug: Optional[str] = None) -> ServiceAccount
    func GetServiceAccount(ctx *Context, name string, id IDInput, state *ServiceAccountState, opts ...ResourceOption) (*ServiceAccount, error)
    public static ServiceAccount Get(string name, Input<string> id, ServiceAccountState? state, CustomResourceOptions? opts = null)
    public static ServiceAccount get(String name, Output<String> id, ServiceAccountState 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:
    Environments List<string>
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    Project string
    The name of the Doppler project where the access is applied
    Role string
    The project role identifier for the access
    ServiceAccountSlug string
    The slug of the Doppler service account
    Environments []string
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    Project string
    The name of the Doppler project where the access is applied
    Role string
    The project role identifier for the access
    ServiceAccountSlug string
    The slug of the Doppler service account
    environments List<String>
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    project String
    The name of the Doppler project where the access is applied
    role String
    The project role identifier for the access
    serviceAccountSlug String
    The slug of the Doppler service account
    environments string[]
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    project string
    The name of the Doppler project where the access is applied
    role string
    The project role identifier for the access
    serviceAccountSlug string
    The slug of the Doppler service account
    environments Sequence[str]
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    project str
    The name of the Doppler project where the access is applied
    role str
    The project role identifier for the access
    service_account_slug str
    The slug of the Doppler service account
    environments List<String>
    The environments in the project where this access will apply (null or omitted for roles with access to all environments)
    project String
    The name of the Doppler project where the access is applied
    role String
    The project role identifier for the access
    serviceAccountSlug String
    The slug of the Doppler service account

    Package Details

    Repository
    doppler pulumiverse/pulumi-doppler
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the doppler Terraform Provider.
    doppler logo
    Doppler v0.7.1 published on Monday, May 27, 2024 by Pulumiverse