1. Packages
  2. Lacework Provider
  3. API Docs
  4. ExternalId
lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework

lacework.ExternalId

Explore with Pulumi AI

This resource generates an External ID (EID) using Lacework format. These IDs are used to create integrations.

The v2 format is:

lweid:<csp>:<version>:<lw_tenant_name>:<aws_acct_id>:<random_string_size_10>

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as lacework from "@pulumi/lacework";

const aws123456789012 = new lacework.ExternalId("aws123456789012", {
    accountId: "123456789012",
    csp: "aws",
});
Copy
import pulumi
import pulumi_lacework as lacework

aws123456789012 = lacework.ExternalId("aws123456789012",
    account_id="123456789012",
    csp="aws")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/lacework/v2/lacework"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lacework.NewExternalId(ctx, "aws123456789012", &lacework.ExternalIdArgs{
			AccountId: pulumi.String("123456789012"),
			Csp:       pulumi.String("aws"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Lacework = Pulumi.Lacework;

return await Deployment.RunAsync(() => 
{
    var aws123456789012 = new Lacework.ExternalId("aws123456789012", new()
    {
        AccountId = "123456789012",
        Csp = "aws",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.lacework.ExternalId;
import com.pulumi.lacework.ExternalIdArgs;
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 aws123456789012 = new ExternalId("aws123456789012", ExternalIdArgs.builder()
            .accountId("123456789012")
            .csp("aws")
            .build());

    }
}
Copy
resources:
  aws123456789012:
    type: lacework:ExternalId
    properties:
      accountId: '123456789012'
      csp: aws
Copy

Create ExternalId Resource

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

Constructor syntax

new ExternalId(name: string, args: ExternalIdArgs, opts?: CustomResourceOptions);
@overload
def ExternalId(resource_name: str,
               args: ExternalIdArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def ExternalId(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               account_id: Optional[str] = None,
               csp: Optional[str] = None,
               external_id_id: Optional[str] = None)
func NewExternalId(ctx *Context, name string, args ExternalIdArgs, opts ...ResourceOption) (*ExternalId, error)
public ExternalId(string name, ExternalIdArgs args, CustomResourceOptions? opts = null)
public ExternalId(String name, ExternalIdArgs args)
public ExternalId(String name, ExternalIdArgs args, CustomResourceOptions options)
type: lacework:ExternalId
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. ExternalIdArgs
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. ExternalIdArgs
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. ExternalIdArgs
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. ExternalIdArgs
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. ExternalIdArgs
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 externalIdResource = new Lacework.ExternalId("externalIdResource", new()
{
    AccountId = "string",
    Csp = "string",
    ExternalIdId = "string",
});
Copy
example, err := lacework.NewExternalId(ctx, "externalIdResource", &lacework.ExternalIdArgs{
AccountId: pulumi.String("string"),
Csp: pulumi.String("string"),
ExternalIdId: pulumi.String("string"),
})
Copy
var externalIdResource = new ExternalId("externalIdResource", ExternalIdArgs.builder()
    .accountId("string")
    .csp("string")
    .externalIdId("string")
    .build());
Copy
external_id_resource = lacework.ExternalId("externalIdResource",
    account_id="string",
    csp="string",
    external_id_id="string")
Copy
const externalIdResource = new lacework.ExternalId("externalIdResource", {
    accountId: "string",
    csp: "string",
    externalIdId: "string",
});
Copy
type: lacework:ExternalId
properties:
    accountId: string
    csp: string
    externalIdId: string
Copy

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

AccountId This property is required. string
The account id from the CSP to be integrated.
Csp This property is required. string
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
ExternalIdId string
AccountId This property is required. string
The account id from the CSP to be integrated.
Csp This property is required. string
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
ExternalIdId string
accountId This property is required. String
The account id from the CSP to be integrated.
csp This property is required. String
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
externalIdId String
accountId This property is required. string
The account id from the CSP to be integrated.
csp This property is required. string
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
externalIdId string
account_id This property is required. str
The account id from the CSP to be integrated.
csp This property is required. str
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
external_id_id str
accountId This property is required. String
The account id from the CSP to be integrated.
csp This property is required. String
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
externalIdId String

Outputs

All input properties are implicitly available as output properties. Additionally, the ExternalId resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
V2 string
The generated External ID version 2.
Id string
The provider-assigned unique ID for this managed resource.
V2 string
The generated External ID version 2.
id String
The provider-assigned unique ID for this managed resource.
v2 String
The generated External ID version 2.
id string
The provider-assigned unique ID for this managed resource.
v2 string
The generated External ID version 2.
id str
The provider-assigned unique ID for this managed resource.
v2 str
The generated External ID version 2.
id String
The provider-assigned unique ID for this managed resource.
v2 String
The generated External ID version 2.

Look up Existing ExternalId Resource

Get an existing ExternalId 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?: ExternalIdState, opts?: CustomResourceOptions): ExternalId
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        csp: Optional[str] = None,
        external_id_id: Optional[str] = None,
        v2: Optional[str] = None) -> ExternalId
func GetExternalId(ctx *Context, name string, id IDInput, state *ExternalIdState, opts ...ResourceOption) (*ExternalId, error)
public static ExternalId Get(string name, Input<string> id, ExternalIdState? state, CustomResourceOptions? opts = null)
public static ExternalId get(String name, Output<String> id, ExternalIdState state, CustomResourceOptions options)
resources:  _:    type: lacework:ExternalId    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:
AccountId string
The account id from the CSP to be integrated.
Csp string
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
ExternalIdId string
V2 string
The generated External ID version 2.
AccountId string
The account id from the CSP to be integrated.
Csp string
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
ExternalIdId string
V2 string
The generated External ID version 2.
accountId String
The account id from the CSP to be integrated.
csp String
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
externalIdId String
v2 String
The generated External ID version 2.
accountId string
The account id from the CSP to be integrated.
csp string
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
externalIdId string
v2 string
The generated External ID version 2.
account_id str
The account id from the CSP to be integrated.
csp str
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
external_id_id str
v2 str
The generated External ID version 2.
accountId String
The account id from the CSP to be integrated.
csp String
The Cloud Service Provider. Valid CSP's include: aws, google, oci, and azure.
externalIdId String
v2 String
The generated External ID version 2.

Package Details

Repository
lacework lacework/terraform-provider-lacework
License
Notes
This Pulumi package is based on the lacework Terraform Provider.