Closed douglasnaphas closed 1 year ago
Removing the CF distro from the remote state, and then re-importing it, worked, all from the command line. The update state shows up in Terraform Cloud.
Done, tf13 is working with this repo now.
Actually, tf13 is not working, as explained here.
I need to fall back to tf12. Steps:
.tfstate
file in my hatgame working directory. Or it may indeed be necessary, because I may need the state file to be tagged with "terraform_version": "0.12.29"
. I might even need to do tf13 state rm on each individual resource, and then tf12 state import them into a local file, and then migrate that local state to Terraform Cloud (my new hatgame-prod-tf12
workspace) using the following steps, and lock the hatgame-prod-tf13
workspace.rm -rf .terraform
, but preserve the terraform.tfstate
file created in the previous step.backend.tf
to point to the workspace hatgame-prod-tf12.tf12 init
The warning in the output below makes me wonder whether I could address the errors I'm seeing on tf13 by deleting my provider source.
$ AWS_PROFILE=douglas tf12 init
Initializing modules...
Downloading terraform-aws-modules/acm/aws 2.10.0 for acm...
- acm in .terraform/modules/acm/terraform-aws-acm-2.10.0
Downloading douglasnaphas/s3-cf-site/aws 0.3.0 for s3-cf-site...
- s3-cf-site in .terraform/modules/s3-cf-site/terraform-aws-s3-cf-site-0.3.0
Initializing the backend...
Successfully configured the backend "local"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 3.2.0...
Warning: Provider source not supported in Terraform v0.12
on versions.tf line 3, in terraform:
3: aws = {
4: source = "hashicorp/aws"
5: }
A source was declared for provider aws. Terraform v0.12 does not support the
provider source attribute. It will be ignored.
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.
I told HashiCorp support:
Hi, Georgi:
I had reviewed the upgrade guide previously, but let me let me try adding required_provider blocks with the source specified as in this section (https://www.terraform.io/upgrade-guides/0-13.html#explicit-provider-source-locations) to the modules that I am importing. I will probably not be able to make and test this change until some time on Wednesday, August 19.
Thank you, Doug
I'm un-stuck on tf12 thanks to an ACM cert quota increase. I need to sort out my S3/CF module so that it actually creates and uses a cert if one is already there instead of using the existing one and then creating another one and not using it, but that doesn't block me from getting a front-end pipeline set up on Hat Game, so I will probably defer it.
Not using Terraform, closing.