ministryofjustice / cloud-platform

Documentation on the MoJ cloud platform
MIT License
87 stars 44 forks source link

Fix Auth0 provider version #6164

Closed timckt closed 1 month ago

timckt commented 1 month ago

Background

The auth0 Terraform provider has been automatically updated from v0.50.2 to v1.6.1 in terraform plan, causing our terraform plan pipeline to fail due to the removal of the token_endpoint_auth_method argument in auth0_client resource. We need to address this breaking change to restore pipeline functionality.

At account layer, the auth0 provider version is ~> 0.50.2.

In the previous success terraform plan pipeline, the auth0 provider is v0.50.2 and it works fine for our code.

- Installing auth0/auth0 v0.50.2...
- Installed auth0/auth0 v0.50.2 (signed by a HashiCorp partner, key ID 7AEA5CE41F2C57F3)

However, in the recent terraform plan pipeline, the auth0 provider is v1.6.1.

- Installing auth0/auth0 v1.6.1...
- Installed auth0/auth0 v1.6.1 (self-signed, key ID 8C31FF0B43BCBE6C)
│ Error: Unsupported argument
│ 
│   on app-opensearch.tf line 366, in resource "auth0_client" "opensearch_app_logs":
│  366:   token_endpoint_auth_method = "none"
│ 
│ An argument named "token_endpoint_auth_method" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on modsec-opensearch.tf line 215, in resource "auth0_client" "opensearch":
│  215:   token_endpoint_auth_method = "none"
│ 
│ An argument named "token_endpoint_auth_method" is not expected here.

The argument token_endpoint_auth_method was removed in version 1.0.0.

The pipeline failures are blocking deployments.

Proposed user journey

Approach

Options for Resolution:

Option 1:

Option 2:

We shall study for option 1 first. If the required changes are too extensive or introduce significant risks, we should then consider Option 2 as an interim solution to quickly restore pipeline functionality.

Which part of the user docs does this impact

Communicate changes

Questions / Assumptions

Definition of done

Reference

How to write good user stories

timckt commented 1 month ago

The terraform plan was fail due to dependabot PR which bump the auth0 provider. Therefore we faced the terraform plan error when manual run terraform plan in account pipeline as it keep using the PR as reference.

We have now closed the dependabot PR and raise a new infra account PR. The terraform plan is now ok.