Resource

dcloud_ecr_signing_key

A key the registry trusts: a cosign public key or notation certificate(s). Images signed with it show as signed, and deploy when the signing policy requires signatures. Destroying it stops trusting the key.

Example Usage

# Trust the key your CI signs with (`cosign generate-key-pair` makes cosign.pub).
resource "dcloud_ecr_signing_key" "release" {
  name = "release"
  kind = "cosign"
  pem  = file("cosign.pub")
}

# A notation root certificate, trusted for one team's repositories only.
resource "dcloud_ecr_signing_key" "platform_ca" {
  name               = "platform-ca"
  kind               = "notation"
  pem                = file("platform-ca.crt")
  repository_pattern = "platform/*"
}

Schema

Required

  • kind (String) cosign (a PEM public key, cosign.pub) or notation (PEM certificates a signature's chain must reach). One of: cosign, notation. Changing it replaces the resource.
  • name (String) A name for the key, unique in the organization: 1–64 letters, digits, space, . _ - (starting with a letter or digit). Up to 64 characters. Must match ^[A-Za-z0-9][A-Za-z0-9 ._-]*$. Changing it replaces the resource.
  • pem (String) The key or certificates, PEM; e.g. file("cosign.pub"). Changing it replaces the resource.

Optional

  • repository_pattern (String) Repositories (* globs) the key may vouch for. Default *. Changing it replaces the resource.

Read-Only

  • fingerprint (String) sha256 of the key (or first certificate).
  • id (String) The resource's id.
  • summary (String) What the key is: algorithm, or certificate subject.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import dcloud_ecr_signing_key.release <key-id>

Generated from the provider's schema.