@spacelift-io/pulumi-spacelift
Version:
A Pulumi package for creating and managing Spacelift resources.
109 lines (108 loc) • 4.49 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* > **Note:** `spacelift.StackAwsRole` is deprecated. Please use `spacelift.AwsRole` instead. The functionality is identical.
*
* `spacelift.StackAwsRole` represents [cross-account IAM role delegation](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) between the Spacelift worker and an individual stack or module. If this is set, Spacelift will use AWS STS to assume the supplied IAM role and put its temporary credentials in the runtime environment.
*
* If you use private workers, you can also assume IAM role on the worker side using your own AWS credentials (e.g. from EC2 instance profile).
*
* Note: when assuming credentials for **shared worker**, Spacelift will use `$accountName@$stackID` or `$accountName@$moduleID` as [external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) and `$runID@$stackID@$accountName` truncated to 64 characters as [session ID](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as spacelift from "@pulumi/spacelift";
*
* const k8s-module = spacelift.getStackAwsRole({
* moduleId: "k8s-module",
* });
* const k8s-core = spacelift.getStackAwsRole({
* stackId: "k8s-core",
* });
* ```
*/
export declare function getStackAwsRole(args?: GetStackAwsRoleArgs, opts?: pulumi.InvokeOptions): Promise<GetStackAwsRoleResult>;
/**
* A collection of arguments for invoking getStackAwsRole.
*/
export interface GetStackAwsRoleArgs {
/**
* ID of the module which assumes the AWS IAM role
*/
moduleId?: string;
/**
* ID of the stack which assumes the AWS IAM role
*/
stackId?: string;
}
/**
* A collection of values returned by getStackAwsRole.
*/
export interface GetStackAwsRoleResult {
/**
* AWS IAM role session duration in seconds
*/
readonly durationSeconds: number;
/**
* Custom external ID (works only for private workers).
*/
readonly externalId: string;
/**
* Generate AWS credentials in the private worker
*/
readonly generateCredentialsInWorker: boolean;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* ID of the module which assumes the AWS IAM role
*/
readonly moduleId?: string;
/**
* ARN of the AWS IAM role to attach
*/
readonly roleArn: string;
/**
* ID of the stack which assumes the AWS IAM role
*/
readonly stackId?: string;
}
/**
* > **Note:** `spacelift.StackAwsRole` is deprecated. Please use `spacelift.AwsRole` instead. The functionality is identical.
*
* `spacelift.StackAwsRole` represents [cross-account IAM role delegation](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) between the Spacelift worker and an individual stack or module. If this is set, Spacelift will use AWS STS to assume the supplied IAM role and put its temporary credentials in the runtime environment.
*
* If you use private workers, you can also assume IAM role on the worker side using your own AWS credentials (e.g. from EC2 instance profile).
*
* Note: when assuming credentials for **shared worker**, Spacelift will use `$accountName@$stackID` or `$accountName@$moduleID` as [external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) and `$runID@$stackID@$accountName` truncated to 64 characters as [session ID](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as spacelift from "@pulumi/spacelift";
*
* const k8s-module = spacelift.getStackAwsRole({
* moduleId: "k8s-module",
* });
* const k8s-core = spacelift.getStackAwsRole({
* stackId: "k8s-core",
* });
* ```
*/
export declare function getStackAwsRoleOutput(args?: GetStackAwsRoleOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetStackAwsRoleResult>;
/**
* A collection of arguments for invoking getStackAwsRole.
*/
export interface GetStackAwsRoleOutputArgs {
/**
* ID of the module which assumes the AWS IAM role
*/
moduleId?: pulumi.Input<string>;
/**
* ID of the stack which assumes the AWS IAM role
*/
stackId?: pulumi.Input<string>;
}