AccountArgs

data class AccountArgs(val accountId: Output<String>? = null, val description: Output<String>? = null, val disabled: Output<Boolean>? = null, val displayName: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<AccountArgs>

Example Usage

This snippet creates a service account in a project.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.serviceAccount.Account;
import com.pulumi.gcp.serviceAccount.AccountArgs;
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 serviceAccount = new Account("serviceAccount", AccountArgs.builder()
.accountId("service-account-id")
.displayName("Service Account")
.build());
}
}

Import

Service accounts can be imported using their URI, e.g.

$ pulumi import gcp:serviceAccount/account:Account my_sa projects/my-project/serviceAccounts/my-sa@my-project.iam.gserviceaccount.com

Constructors

Link copied to clipboard
fun AccountArgs(accountId: Output<String>? = null, description: Output<String>? = null, disabled: Output<Boolean>? = null, displayName: Output<String>? = null, project: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): AccountArgs

Properties

Link copied to clipboard
val accountId: Output<String>? = null

The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression a-z to comply with RFC1035. Changing this forces a new service account to be created.

Link copied to clipboard
val description: Output<String>? = null

A text description of the service account. Must be less than or equal to 256 UTF-8 bytes.

Link copied to clipboard
val disabled: Output<Boolean>? = null

Whether a service account is disabled or not. Defaults to false. This field has no effect during creation. Must be set after creation to disable a service account.

Link copied to clipboard
val displayName: Output<String>? = null

The display name for the service account. Can be updated without creating a new resource.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project that the service account will be created in. Defaults to the provider project configuration.