harness.platform.ServiceAccount

Resource for creating service account.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Harness = Lbrlabs.PulumiPackage.Harness;

return await Deployment.RunAsync(() => 
{
    var example = new Harness.Platform.ServiceAccount("example", new()
    {
        AccountId = "account_id",
        Description = "test",
        Email = "email@service.harness.io",
        Identifier = "identifier",
        Tags = new[]
        {
            "foo:bar",
        },
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.NewServiceAccount(ctx, "example", &platform.ServiceAccountArgs{
			AccountId:   pulumi.String("account_id"),
			Description: pulumi.String("test"),
			Email:       pulumi.String("email@service.harness.io"),
			Identifier:  pulumi.String("identifier"),
			Tags: pulumi.StringArray{
				pulumi.String("foo:bar"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.ServiceAccount;
import com.pulumi.harness.platform.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 example = new ServiceAccount("example", ServiceAccountArgs.builder()        
            .accountId("account_id")
            .description("test")
            .email("email@service.harness.io")
            .identifier("identifier")
            .tags("foo:bar")
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_harness as harness

example = harness.platform.ServiceAccount("example",
    account_id="account_id",
    description="test",
    email="email@service.harness.io",
    identifier="identifier",
    tags=["foo:bar"])
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const example = new harness.platform.ServiceAccount("example", {
    accountId: "account_id",
    description: "test",
    email: "email@service.harness.io",
    identifier: "identifier",
    tags: ["foo:bar"],
});
resources:
  example:
    type: harness:platform:ServiceAccount
    properties:
      accountId: account_id
      description: test
      email: email@service.harness.io
      identifier: identifier
      tags:
        - foo:bar

Create ServiceAccount Resource

new ServiceAccount(name: string, args: ServiceAccountArgs, opts?: CustomResourceOptions);
@overload
def ServiceAccount(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   account_id: Optional[str] = None,
                   description: Optional[str] = None,
                   email: Optional[str] = None,
                   identifier: Optional[str] = None,
                   name: Optional[str] = None,
                   org_id: Optional[str] = None,
                   project_id: Optional[str] = None,
                   tags: Optional[Sequence[str]] = None)
@overload
def ServiceAccount(resource_name: str,
                   args: ServiceAccountArgs,
                   opts: Optional[ResourceOptions] = 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: harness:platform:ServiceAccount
properties: # The arguments to resource properties.
options: # 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.
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.

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:

AccountId string

Account Identifier for the Entity.

Email string

Email of the Service Account.

Identifier string

Unique identifier of the resource.

Description string

Description of the resource.

Name string

Name of the resource.

OrgId string

Unique identifier of the Organization.

ProjectId string

Unique identifier of the Project.

Tags List<string>

Tags to associate with the resource. Tags should be in the form name:value.

AccountId string

Account Identifier for the Entity.

Email string

Email of the Service Account.

Identifier string

Unique identifier of the resource.

Description string

Description of the resource.

Name string

Name of the resource.

OrgId string

Unique identifier of the Organization.

ProjectId string

Unique identifier of the Project.

Tags []string

Tags to associate with the resource. Tags should be in the form name:value.

accountId String

Account Identifier for the Entity.

email String

Email of the Service Account.

identifier String

Unique identifier of the resource.

description String

Description of the resource.

name String

Name of the resource.

orgId String

Unique identifier of the Organization.

projectId String

Unique identifier of the Project.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

accountId string

Account Identifier for the Entity.

email string

Email of the Service Account.

identifier string

Unique identifier of the resource.

description string

Description of the resource.

name string

Name of the resource.

orgId string

Unique identifier of the Organization.

projectId string

Unique identifier of the Project.

tags string[]

Tags to associate with the resource. Tags should be in the form name:value.

account_id str

Account Identifier for the Entity.

email str

Email of the Service Account.

identifier str

Unique identifier of the resource.

description str

Description of the resource.

name str

Name of the resource.

org_id str

Unique identifier of the Organization.

project_id str

Unique identifier of the Project.

tags Sequence[str]

Tags to associate with the resource. Tags should be in the form name:value.

accountId String

Account Identifier for the Entity.

email String

Email of the Service Account.

identifier String

Unique identifier of the resource.

description String

Description of the resource.

name String

Name of the resource.

orgId String

Unique identifier of the Organization.

projectId String

Unique identifier of the Project.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

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,
        account_id: Optional[str] = None,
        description: Optional[str] = None,
        email: Optional[str] = None,
        identifier: Optional[str] = None,
        name: Optional[str] = None,
        org_id: Optional[str] = None,
        project_id: Optional[str] = None,
        tags: Optional[Sequence[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:
AccountId string

Account Identifier for the Entity.

Description string

Description of the resource.

Email string

Email of the Service Account.

Identifier string

Unique identifier of the resource.

Name string

Name of the resource.

OrgId string

Unique identifier of the Organization.

ProjectId string

Unique identifier of the Project.

Tags List<string>

Tags to associate with the resource. Tags should be in the form name:value.

AccountId string

Account Identifier for the Entity.

Description string

Description of the resource.

Email string

Email of the Service Account.

Identifier string

Unique identifier of the resource.

Name string

Name of the resource.

OrgId string

Unique identifier of the Organization.

ProjectId string

Unique identifier of the Project.

Tags []string

Tags to associate with the resource. Tags should be in the form name:value.

accountId String

Account Identifier for the Entity.

description String

Description of the resource.

email String

Email of the Service Account.

identifier String

Unique identifier of the resource.

name String

Name of the resource.

orgId String

Unique identifier of the Organization.

projectId String

Unique identifier of the Project.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

accountId string

Account Identifier for the Entity.

description string

Description of the resource.

email string

Email of the Service Account.

identifier string

Unique identifier of the resource.

name string

Name of the resource.

orgId string

Unique identifier of the Organization.

projectId string

Unique identifier of the Project.

tags string[]

Tags to associate with the resource. Tags should be in the form name:value.

account_id str

Account Identifier for the Entity.

description str

Description of the resource.

email str

Email of the Service Account.

identifier str

Unique identifier of the resource.

name str

Name of the resource.

org_id str

Unique identifier of the Organization.

project_id str

Unique identifier of the Project.

tags Sequence[str]

Tags to associate with the resource. Tags should be in the form name:value.

accountId String

Account Identifier for the Entity.

description String

Description of the resource.

email String

Email of the Service Account.

identifier String

Unique identifier of the resource.

name String

Name of the resource.

orgId String

Unique identifier of the Organization.

projectId String

Unique identifier of the Project.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

Import

Import using secret sshkey id

 $ pulumi import harness:platform/serviceAccount:ServiceAccount example <service_account_id>

Package Details

Repository
harness lbrlabs/pulumi-harness
License
Apache-2.0
Notes

This Pulumi package is based on the harness Terraform Provider.