terraform-google-modules/terraform-google-bootstrap

Upgrading from 1.7.x to 2.x.x more specifically from terraform-example-foundation

ipv1337 opened this issue · 0 comments

The ultimate goal here for me is to upgrade terraform foundation code base v1 to terraform version from 0.12.x to 0.13.x. I will be still using the foundation v1 code base and only merging parts of v2 that I would need as there are architectural changes I won't be back porting like the new alternative hub-and-spoke network architecture.

This bootstrap module is used in 0-bootstrap for the foundation code base so this was where I would start first with this attempted upgrade. Here's what I've done so far:

  1. Manually merged terraform-example-foundation 0-bootstrap v2 into our existing 0-bootstrap v1 code base
  2. Downloaded terraform v0.13.x binary
  3. Using terraform 0.13.x ran init and plan
  4. I'm not expecting any in-place upgrade as noted in https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/docs/upgrading_to_v2.0.md, so I know there would be new projects created I would need to transition to in further steps of the foundation code base

But during the plan, I get these errors which I do know why they happen:

cd envs/shared && tf13.7 init
Initializing modules...

Initializing the backend...

Initializing provider plugins...
- Using previously-installed -/external v2.1.0
- Using previously-installed -/google-beta v3.67.0
- Using previously-installed -/random v3.1.0
- Using previously-installed hashicorp/google v3.67.0
- Using previously-installed hashicorp/null v2.1.2
- Using previously-installed hashicorp/random v2.3.1
- Using previously-installed -/google v3.67.0
- Using previously-installed -/null v3.1.0
- Using previously-installed hashicorp/google-beta v3.67.0

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, we recommend adding version constraints in a required_providers block
in your configuration, with the constraint strings suggested below.

* -/external: version = "~> 2.1.0"
* -/google: version = "~> 3.67.0"
* -/google-beta: version = "~> 3.67.0"
* -/null: version = "~> 3.1.0"
* -/random: version = "~> 3.1.0"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
cd envs/shared && tf13.7 plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


Error: Provider configuration not present

To work with
module.cloudbuild_bootstrap.google_project_service.cloudbuild_apis["sourcerepo.googleapis.com"]
its original provider configuration at
provider["registry.terraform.io/-/google"] is required, but it has been
removed. This occurs when a provider configuration is removed while objects
created by that provider still exist in the state. Re-add the provider
configuration to destroy
module.cloudbuild_bootstrap.google_project_service.cloudbuild_apis["sourcerepo.googleapis.com"],
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.seed_bootstrap.module.seed_project.module.project-factory.module.gcloud_disable.null_resource.run_destroy_command[0]
its original provider configuration at
provider["registry.terraform.io/-/null"] is required, but it has been removed.
This occurs when a provider configuration is removed while objects created by
that provider still exist in the state. Re-add the provider configuration to
destroy
module.seed_bootstrap.module.seed_project.module.project-factory.module.gcloud_disable.null_resource.run_destroy_command[0],
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.module.gcloud_disable.data.external.env_override[0]
its original provider configuration at
provider["registry.terraform.io/-/external"] is required, but it has been
removed. This occurs when a provider configuration is removed while objects
created by that provider still exist in the state. Re-add the provider
configuration to destroy
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.module.gcloud_disable.data.external.env_override[0],
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.module.gcloud_disable.null_resource.run_command[0]
its original provider configuration at
provider["registry.terraform.io/-/null"] is required, but it has been removed.
This occurs when a provider configuration is removed while objects created by
that provider still exist in the state. Re-add the provider configuration to
destroy
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.module.gcloud_disable.null_resource.run_command[0],
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.cloudbuild_bootstrap.google_project_service.cloudbuild_apis["cloudkms.googleapis.com"]
its original provider configuration at
provider["registry.terraform.io/-/google"] is required, but it has been
removed. This occurs when a provider configuration is removed while objects
created by that provider still exist in the state. Re-add the provider
configuration to destroy
module.cloudbuild_bootstrap.google_project_service.cloudbuild_apis["cloudkms.googleapis.com"],
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.data.null_data_source.default_service_account
its original provider configuration at
provider["registry.terraform.io/-/null"] is required, but it has been removed.
This occurs when a provider configuration is removed while objects created by
that provider still exist in the state. Re-add the provider configuration to
destroy
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.data.null_data_source.default_service_account,
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.seed_bootstrap.module.seed_project.module.project-factory.module.gcloud_disable.data.external.env_override[0]
its original provider configuration at
provider["registry.terraform.io/-/external"] is required, but it has been
removed. This occurs when a provider configuration is removed while objects
created by that provider still exist in the state. Re-add the provider
configuration to destroy
module.seed_bootstrap.module.seed_project.module.project-factory.module.gcloud_disable.data.external.env_override[0],
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.module.gcloud_disable.null_resource.run_destroy_command[0]
its original provider configuration at
provider["registry.terraform.io/-/null"] is required, but it has been removed.
This occurs when a provider configuration is removed while objects created by
that provider still exist in the state. Re-add the provider configuration to
destroy
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.module.gcloud_disable.null_resource.run_destroy_command[0],
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.seed_bootstrap.module.seed_project.module.project-factory.data.null_data_source.default_service_account
its original provider configuration at
provider["registry.terraform.io/-/null"] is required, but it has been removed.
This occurs when a provider configuration is removed while objects created by
that provider still exist in the state. Re-add the provider configuration to
destroy
module.seed_bootstrap.module.seed_project.module.project-factory.data.null_data_source.default_service_account,
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.cloudbuild_bootstrap.google_project_service.cloudbuild_apis["cloudbuild.googleapis.com"]
its original provider configuration at
provider["registry.terraform.io/-/google"] is required, but it has been
removed. This occurs when a provider configuration is removed while objects
created by that provider still exist in the state. Re-add the provider
configuration to destroy
module.cloudbuild_bootstrap.google_project_service.cloudbuild_apis["cloudbuild.googleapis.com"],
after which you can remove the provider configuration again.


Error: Provider configuration not present

To work with
module.seed_bootstrap.module.seed_project.module.project-factory.module.gcloud_disable.null_resource.run_command[0]
its original provider configuration at
provider["registry.terraform.io/-/null"] is required, but it has been removed.
This occurs when a provider configuration is removed while objects created by
that provider still exist in the state. Re-add the provider configuration to
destroy
module.seed_bootstrap.module.seed_project.module.project-factory.module.gcloud_disable.null_resource.run_command[0],
after which you can remove the provider configuration again.

This question is am I attacking this problem correctly or did I miss something?