import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a GitHub Actions OIDC identity mapping (called a persona mapping in the Datadog API) for Datadog workload identity federation. The mapping allows a GitHub Actions workload whose OIDC token matches the `claimMatchers` patterns to authenticate as the Datadog user or service account identified by `accountIdentifier`. The identity creating the mapping must have every permission assigned to the target identity. Creating the initial mapping requires API and application credentials with the Workload Identity Federation write permission; a provider already using federation cannot bootstrap its own mapping. Mappings cannot be updated; changing any attribute replaces the mapping. This resource uses a public beta API and is subject to change. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as datadog from "@pulumi/datadog"; * * const readOnly = datadog.getRole({ * filter: "Datadog Read Only Role", * }); * const terraform = new datadog.ServiceAccount("terraform", { * email: "terraform-service-account@example.com", * name: "Terraform service account", * roles: [readOnly.then(readOnly => readOnly.id)], * }); * const terraformGithubOidcIdentityMapping = new datadog.GithubOidcIdentityMapping("terraform", { * accountIdentifier: terraform.id, * claimMatchers: [{ * sub: "repo:my-org/terraform:ref:refs/heads/main", * repository: "^my-org/terraform$", * }], * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * ```sh * $ pulumi import datadog:index/githubOidcIdentityMapping:GithubOidcIdentityMapping terraform "00000000-0000-0000-0000-000000000000" * ``` */ export declare class GithubOidcIdentityMapping extends pulumi.CustomResource { /** * Get an existing GithubOidcIdentityMapping resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: GithubOidcIdentityMappingState, opts?: pulumi.CustomResourceOptions): GithubOidcIdentityMapping; /** * Check whether an existing GithubOidcIdentityMapping resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: GithubOidcIdentityMappingState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of GithubOidcIdentityMapping. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is GithubOidcIdentityMapping; /** * The email or handle of the Datadog user or service account that the GitHub workload authenticates as. For a Terraform-managed service account, prefer the stable UUID exported by `datadog_service_account.id`; Datadog accepts it as the service account identifier. Datadog normalizes an email to the account's handle, so the handle form is the only value that survives `pulumi import` unchanged — importing a mapping configured by email produces a diff on this attribute, which forces replacement. String length must be at least 1. */ readonly accountIdentifier: pulumi.Output; /** * The UUID of the Datadog user or service account resolved from `accountIdentifier`. */ readonly accountUuid: pulumi.Output; /** * GitHub Actions OIDC claims to match against. Each argument is a regular expression; `sub` is required and all other claims are optional. A token matches only when all provided patterns match simultaneously (AND semantics). */ readonly claimMatchers: pulumi.Output; /** * Create a GithubOidcIdentityMapping resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: GithubOidcIdentityMappingArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering GithubOidcIdentityMapping resources. */ export interface GithubOidcIdentityMappingState { /** * The email or handle of the Datadog user or service account that the GitHub workload authenticates as. For a Terraform-managed service account, prefer the stable UUID exported by `datadog_service_account.id`; Datadog accepts it as the service account identifier. Datadog normalizes an email to the account's handle, so the handle form is the only value that survives `pulumi import` unchanged — importing a mapping configured by email produces a diff on this attribute, which forces replacement. String length must be at least 1. */ accountIdentifier?: pulumi.Input; /** * The UUID of the Datadog user or service account resolved from `accountIdentifier`. */ accountUuid?: pulumi.Input; /** * GitHub Actions OIDC claims to match against. Each argument is a regular expression; `sub` is required and all other claims are optional. A token matches only when all provided patterns match simultaneously (AND semantics). */ claimMatchers?: pulumi.Input; } /** * The set of arguments for constructing a GithubOidcIdentityMapping resource. */ export interface GithubOidcIdentityMappingArgs { /** * The email or handle of the Datadog user or service account that the GitHub workload authenticates as. For a Terraform-managed service account, prefer the stable UUID exported by `datadog_service_account.id`; Datadog accepts it as the service account identifier. Datadog normalizes an email to the account's handle, so the handle form is the only value that survives `pulumi import` unchanged — importing a mapping configured by email produces a diff on this attribute, which forces replacement. String length must be at least 1. */ accountIdentifier: pulumi.Input; /** * GitHub Actions OIDC claims to match against. Each argument is a regular expression; `sub` is required and all other claims are optional. A token matches only when all provided patterns match simultaneously (AND semantics). */ claimMatchers: pulumi.Input; } //# sourceMappingURL=githubOidcIdentityMapping.d.ts.map