Skip to content

Fix container registry resource "oidc_authentication" examples#34

Open
OzoneNZ wants to merge 2 commits into
OctopusDeploy:mainfrom
OzoneNZ:feature/container-registries-block-fix
Open

Fix container registry resource "oidc_authentication" examples#34
OzoneNZ wants to merge 2 commits into
OctopusDeploy:mainfrom
OzoneNZ:feature/container-registries-block-fix

Conversation

@OzoneNZ

@OzoneNZ OzoneNZ commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

Overview

Usage examples for the new oidc_authentication attribute appear to incorrectly show it as a SingleNestedBlock type rather than a SingleNestedAttribute as described by the underlying resource schemas:

Interestingly, the usage examples for octopusdeploy_aws_elastic_container_registry appear to be true-to-schema.

Reproduction

Minimal workspace that reproduces the schema errors upon terraform validate - though the current examples listed on registry pages also work:

terraform {
  required_providers {
    octopusdeploy = {
      source  = "octopusdeploy/octopusdeploy"
      version = "= 1.1.0"
    }
  }
}

provider "octopusdeploy" {}

resource "octopusdeploy_azure_container_registry" "test" {
  name     = "test"
  feed_uri = "test"

  oidc_authentication {
    tenant_id = "00000000-0000-0000-0000-000000000000"
    client_id = "00000000-0000-0000-0000-000000000000"
    audience  = "api://AzureADTokenExchange"
    subject_keys = [
      "space",
      "feed"
    ]
  }
}

resource "octopusdeploy_google_container_registry" "test" {
  name     = "test"
  feed_uri = "test"

  oidc_authentication {
    audience = "test"
    subject_keys = [
      "space",
      "feed"
    ]
  }
}

Resultant validation errors:

image

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.

1 participant