Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flesh out types from the oci_ref data source #6

Merged
merged 3 commits into from
Apr 27, 2023

Conversation

imjasonh
Copy link
Member

@imjasonh imjasonh commented Apr 27, 2023

Fixes #1

This enables things like:

data "oci_ref" "alpine" { ref = "alpine" }

output "amd64" { value = oci_ref.alpine.images["linux/amd64"].image_ref }

or

# Sign all the images in the index.
resource "cosign_sign" "images" {
  for_each = oci_ref.alpine.images
  image = each.value.image_ref
}

# Verify all images in the index pass the policy.
data "cosign_verify" "images" {
  for_each = oci_ref.alpine.images
  image = each.value.image_ref
  policy = "..."
}

It also gives some useful data from an image's config, and all the data available in the manifest, in case that's useful.

output "created_at" {
  value = oci_ref.alpine.config.created_at
}

Signed-off-by: Jason Hall <jason@chainguard.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crane_ref outputs
2 participants