> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# coreweave_iam_service_account_oidc_trust_config (Resource)

Creates and manages an OIDC trust rule for a CoreWeave service account.

## Example usage

```terraform theme={"system"}
resource "coreweave_workload_federation_oidc_config" "github" {
  name       = "github-actions"
  issuer_url = "https://token.actions.githubusercontent.com"
  audience   = "https://api.coreweave.com"
}

resource "coreweave_iam_service_account_oidc_trust_config" "main" {
  id                                 = "main-repository"
  organization_id                    = "a1b2c3"
  service_account_id                 = "github-actions"
  workload_federation_oidc_config_id = coreweave_workload_federation_oidc_config.github.id
  description                        = "Trust workflows from the main repository"
  cel                                = <<-EOT
    token.repository == "example/example" &&
    token.ref == "refs/heads/main"
  EOT
}
```

## Schema

### Required

* `cel` (String) The CEL expression evaluated against verified OIDC token claims exposed through the `token` namespace.
* `id` (String) The caller-chosen trust configuration ID.
* `organization_id` (String) The six-character ID of the owning CoreWeave organization.
* `service_account_id` (String) The ID of the service account that owns this trust configuration.
* `workload_federation_oidc_config_id` (String) The UID of the workload federation OIDC configuration used to verify tokens.

### Optional

* `description` (String) An optional description of the trust rule. Defaults to an empty string.

### Read-Only

* `created_at` (String) The RFC 3339 creation timestamp.
* `name` (String) The canonical resource name.
* `uid` (String) The server-generated unique identifier.
* `updated_at` (String) The RFC 3339 last-update timestamp.

## Import

Import is supported using the following syntax:

```bash theme={"system"}
terraform import coreweave_iam_service_account_oidc_trust_config.main organizations/a1b2c3/serviceAccounts/github-actions/oidcTrustConfigs/main-repository
```

```terraform theme={"system"}
import {
  to = coreweave_iam_service_account_oidc_trust_config.main
  id = "organizations/a1b2c3/serviceAccounts/github-actions/oidcTrustConfigs/main-repository"
}
```
