1. Packages
  2. Doppler
  3. API Docs
  4. projectMember
  5. ServiceAccount
Doppler v0.9.0 published on Tuesday, Aug 27, 2024 by Pulumiverse

doppler.projectMember.ServiceAccount

Explore with Pulumi AI

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",
    ],
});
Copy
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",
    ])
Copy
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
	})
}
Copy
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",
        },
    });

});
Copy
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());

    }
}
Copy
resources:
  backendCi:
    type: doppler:projectMember:ServiceAccount
    name: backend_ci
    properties:
      project: backend
      serviceAccountSlug: ${ci.slug}
      role: viewer
      environments:
        - dev
        - stg
        - prd
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. ServiceAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. ServiceAccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
    },
});
Copy
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"),
	},
})
Copy
var dopplerServiceAccountResource = new ServiceAccount("dopplerServiceAccountResource", ServiceAccountArgs.builder()
    .project("string")
    .role("string")
    .serviceAccountSlug("string")
    .environments("string")
    .build());
Copy
doppler_service_account_resource = doppler.project_member.ServiceAccount("dopplerServiceAccountResource",
    project="string",
    role="string",
    service_account_slug="string",
    environments=["string"])
Copy
const dopplerServiceAccountResource = new doppler.projectmember.ServiceAccount("dopplerServiceAccountResource", {
    project: "string",
    role: "string",
    serviceAccountSlug: "string",
    environments: ["string"],
});
Copy
type: doppler:projectMember:ServiceAccount
properties:
    environments:
        - string
    project: string
    role: string
    serviceAccountSlug: string
Copy

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

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

The ServiceAccount resource accepts the following input properties:

Project
This property is required.
Changes to this property will trigger replacement.
string
The name of the Doppler project where the access is applied
Role This property is required. string
The project role identifier for the access
ServiceAccountSlug
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
string
The name of the Doppler project where the access is applied
Role This property is required. string
The project role identifier for the access
ServiceAccountSlug
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
String
The name of the Doppler project where the access is applied
role This property is required. String
The project role identifier for the access
serviceAccountSlug
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
string
The name of the Doppler project where the access is applied
role This property is required. string
The project role identifier for the access
serviceAccountSlug
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
str
The name of the Doppler project where the access is applied
role This property is required. str
The project role identifier for the access
service_account_slug
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
String
The name of the Doppler project where the access is applied
role This property is required. String
The project role identifier for the access
serviceAccountSlug
This property is required.
Changes to this property will trigger replacement.
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)
resources:  _:    type: doppler:projectMember:ServiceAccount    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
The name of the Doppler project where the access is applied
Role string
The project role identifier for the access
ServiceAccountSlug Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The name of the Doppler project where the access is applied
Role string
The project role identifier for the access
ServiceAccountSlug Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The name of the Doppler project where the access is applied
role String
The project role identifier for the access
serviceAccountSlug Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The name of the Doppler project where the access is applied
role string
The project role identifier for the access
serviceAccountSlug Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The name of the Doppler project where the access is applied
role str
The project role identifier for the access
service_account_slug Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The name of the Doppler project where the access is applied
role String
The project role identifier for the access
serviceAccountSlug Changes to this property will trigger replacement. 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.