Open jaskaransarkaria opened 1 month ago
This is the error when trying to bump auth0 provider from 0.50.2
to 1.7.3
│ Error: Failed to decode resource from state
│
│ Error decoding "module.sso.auth0_client.saml" from previous state: missing expected [
╵
╷
│ Error: missing expected [
│
│ with auth0_client.opensearch_app_logs,
│ on app-opensearch.tf line 399, in resource "auth0_client" "opensearch_app_logs":
│ 399: addons {
│
╵
╷
│ Error: missing expected [
│
│ with auth0_client.opensearch,
│ on modsec-opensearch.tf line 218, in resource "auth0_client" "opensearch":
│ 218: addons {
│
╵
╷
│ Error: missing expected [
│
│ with module.sso.auth0_client.saml,
│ on .terraform/modules/sso/auth0.tf line 12, in resource "auth0_client" "saml":
│ 12: addons {
│
Also the same error on the TF plan check in the dependabot PR: https://github.com/ministryofjustice/cloud-platform-infrastructure/pull/3540
Possible fix: Migration guide
Need to test the steps in the Migration guide, which involves tinkering with the state file. The best place to test is in the ephemeral test account
Blocked until https://github.com/ministryofjustice/cloud-platform/issues/6519 is done
Reproduced same kind of errors when trying to upgrade auth0 provider in ephemeral test account:
│ Error: Failed to decode resource from state
│
│ Error decoding "module.sso.auth0_client.saml" from previous state: missing expected [
╵
╷
│ Error: missing expected [
│
│ with module.sso.auth0_client.saml,
│ on .terraform/modules/sso/auth0.tf line 12, in resource "auth0_client" "saml":
│ 12: addons {
Background
https://github.com/ministryofjustice/cloud-platform-infrastructure/blob/ee2997721c28a7e54f4565103985950d0ca15c63/terraform/aws-accounts/cloud-platform-aws/account/versions.tf#L6
We can't upgrade this possibly because of this issue https://github.com/alexkappa/terraform-provider-auth0/issues/157
Definition of done
Reference
How to write good user stories