Skip to main content

~> Deprecation Notice Equinix Metal will reach end of life on June 30, 2026. All Metal resources will be removed in version 5.0.0 of this provider. Use version 4.x of this provider for continued use through sunset. See https://docs.equinix.com/metal/ for more information.

equinix_metal_project_api_key (Resource)

Use this resource to create Metal Project API Key resources in Equinix Metal. Project API keys can be used to create and read resources in a single project. Each API key contains a token which can be used for authentication in Equinix Metal HTTP API (in HTTP request header X-Auth-Token).

Read-only keys only allow to list and view existing resources, read-write keys can also be used to create resources.

Example Usage

# Create a new read-only API key in existing project
resource "equinix_metal_project_api_key" "test" {
project_id = local.existing_project_id
description = "Read-only key scoped to a projct"
read_only = true
}

Argument Reference

The following arguments are supported:

  • project_id - (Required) UUID of the project where the API key is scoped to.
  • description - (Required) Description string for the Project API Key resource.
  • read-only - (Optional) Flag indicating whether the API key shoud be read-only.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • token - API token which can be used in Equinix Metal API clients
Was this page helpful?