You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(iac): use state-migrate for admin token resource moves (#2420)
The `moved` blocks for admin token resources conflict with
`-target=module.init` in `apply-init`, causing Terraform to fail.
Replace them with `terraform state mv` commands in `state-migrate`,
which runs before `apply-init` in CI.
Copy file name to clipboardExpand all lines: iac/provider-gcp/Makefile
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -116,6 +116,12 @@ init:
116
116
.PHONY: state-migrate
117
117
state-migrate:
118
118
@ printf"Running Terraform state migrations for env: `tput setaf 2``tput bold`$(ENV)`tput sgr0`\n\n"
119
+
@ $(tf_vars)$(TF) state mv 'random_password.api_admin_secret''module.init.random_password.api_admin_secret'||true
120
+
@ $(tf_vars)$(TF) state mv 'google_secret_manager_secret.api_admin_token''module.init.google_secret_manager_secret.api_admin_token'||true
121
+
@ $(tf_vars)$(TF) state mv 'google_secret_manager_secret_version.api_admin_token_value''module.init.google_secret_manager_secret_version.api_admin_token_value'||true
122
+
@ $(tf_vars)$(TF) state mv 'random_password.dashboard_api_admin_secret''module.init.random_password.dashboard_api_admin_secret'||true
123
+
@ $(tf_vars)$(TF) state mv 'google_secret_manager_secret.dashboard_api_admin_token''module.init.google_secret_manager_secret.dashboard_api_admin_token'||true
124
+
@ $(tf_vars)$(TF) state mv 'google_secret_manager_secret_version.dashboard_api_admin_token_value''module.init.google_secret_manager_secret_version.dashboard_api_admin_token_value'||true
0 commit comments