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

Error: undefined response type when re-running terraform plan/apply after initial success in Authlete 3.0 #175

Open
toyopilgrim opened this issue Jan 24, 2025 · 1 comment
Assignees

Comments

@toyopilgrim
Copy link

toyopilgrim commented Jan 24, 2025

In Authlete 3.0, after successfully applying a Terraform configuration, subsequent terraform plan or terraform apply commands fail with the error Error: undefined response type.

Terraform Version

v1.10.4

Affected Resource(s)

  • authlete_service
  • authlete_client

Terraform Configuration Files

terraform {
  required_providers {
    authlete = {
      source  = "authlete/authlete"
      version = ">=1.3.16"
    }
  }
}

resource "authlete_service" "as" {
  issuer = "https://as.mydomain.com"
  service_name = "MyDomainAS"
  description = "A terraform based service for managing the Authlete based OAuth server"
  supported_grant_types = ["AUTHORIZATION_CODE", "CLIENT_CREDENTIALS"]
  supported_response_types = [
    "CODE",
    "CODE_ID_TOKEN"
  ]
}

Expected Behavior

Both terraform plan and terraform apply should succeed without errors.

Actual Behavior

% terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # authlete_service.as will be created
  + resource "authlete_service" "as" {
      + access_token_type                     = (known after apply)
      + api_secret                            = (sensitive value)
      + client_id_alias_enabled               = false
      + dcr_scope_used_as_requestable         = (known after apply)
      + description                           = "A terraform based service for managing the Authlete based OAuth server"
      + direct_authorization_endpoint_enabled = false
      + direct_introspection_endpoint_enabled = (known after apply)
      + direct_jwks_endpoint_enabled          = false
      + direct_revocation_endpoint_enabled    = (known after apply)
      + direct_token_endpoint_enabled         = (known after apply)
      + direct_user_info_endpoint_enabled     = false
      + id                                    = (known after apply)
      + ignore_port_loopback_redirect         = (known after apply)
      + issuer                                = "https://as.mydomain.com"
      + service_name                          = "MyDomainAS"
      + single_access_token_per_subject       = (known after apply)
      + supported_claim_types                 = (known after apply)
      + supported_displays                    = (known after apply)
      + supported_grant_types                 = [
          + "AUTHORIZATION_CODE",
          + "CLIENT_CREDENTIALS",
        ]
      + supported_introspection_auth_methods  = (known after apply)
      + supported_response_types              = [
          + "CODE",
          + "CODE_ID_TOKEN",
        ]
      + supported_revocation_auth_methods     = (known after apply)
      + supported_token_auth_methods          = (known after apply)

      + supported_scopes (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + api_key    = (known after apply)
  + api_secret = (sensitive value)

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

authlete_service.as: Creating...
authlete_service.as: Creation complete after 7s [id=xxxxxx]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

api_key = "xxxxxxx"
api_secret = <sensitive>



% terraform plan
authlete_service.as: Refreshing state... [id=xxxxxx]

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: undefined response type
│ 
│   with authlete_service.as,
│   on main.tf line 4, in resource "authlete_service" "as":
│    4: resource "authlete_service" "as" {
│ 
╵

Steps to Reproduce

export AUTHLETE_API_VERSION=3.0
export AUTHLETE_ORGANIZATION_ID=XXXXXXX
export AUTHLETE_SO_SECRET=XXXXX
export AUTHLETE_API_SERVER_ID=XXXXX
export AUTHLETE_API_SERVER="https://jp.authlete.com/" 
export AUTHLETE_IDP_SERVER="https://login.authlete.com"

terraform apply 
terraform plan 
@shaikathaque
Copy link
Member

@toyopilgrim Thank you for bringing this to our attention. We are looking into it and will post updates as they become available.

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

No branches or pull requests

5 participants