terraform-google-modules/terraform-google-pubsub

Unable to run the tests

Closed this issue · 4 comments

I was getting errors while trying to run the tests to check an enhancement I was working on.

make docker_test_prepare
docker run --rm -it \
                -e SERVICE_ACCOUNT_JSON \
                -e TF_VAR_org_id \
                -e TF_VAR_folder_id \
                -e TF_VAR_billing_account \
                -v "${LOCAL_PATH}/public-modules/terraform-google-pubsub":/workspace \
                gcr.io/cloud-foundation-cicd/cft/developer-tools:0 \
                /usr/local/bin/execute_with_credentials.sh prepare_environment
Activated service account credentials for: [terraform@myProject.iam.gserviceaccount.com]
Activated service account credentials for: [terraform@myProject.iam.gserviceaccount.com]
Initializing modules...

Error: Unsupported Terraform Core version

  on versions.tf line 18, in terraform:
  18:   required_version = "~> 0.12.0"

This configuration does not support Terraform version 0.13.5. To proceed,
either choose another supported Terraform version or update this version
constraint. Version constraints are normally set for good reason, so updating
the constraint may lead to other errors or unexpected behavior.


Error: Unsupported Terraform Core version

  on .terraform/modules/project-ci-int-pubsub/versions.tf line 18, in terraform:
  18:   required_version = "~> 0.12.6"

Module module.project-ci-int-pubsub (from
terraform-google-modules/project-factory/google) does not support Terraform
version 0.13.5. To proceed, either choose another supported Terraform version
or update this version constraint. Version constraints are normally set for
good reason, so updating the constraint may lead to other errors or unexpected
behavior.


Error: Unsupported Terraform Core version

  on .terraform/modules/project-ci-int-pubsub/modules/budget/versions.tf line 18, in terraform:
  18:   required_version = "~> 0.12.6"

Module module.project-ci-int-pubsub.module.budget (from ./modules/budget) does
not support Terraform version 0.13.5. To proceed, either choose another
supported Terraform version or update this version constraint. Version
constraints are normally set for good reason, so updating the constraint may
lead to other errors or unexpected behavior.


Error: Unsupported Terraform Core version

  on .terraform/modules/project-ci-int-pubsub/modules/core_project_factory/versions.tf line 18, in terraform:
  18:   required_version = "~> 0.12.6"

Module module.project-ci-int-pubsub.module.project-factory (from
./modules/core_project_factory) does not support Terraform version 0.13.5. To
proceed, either choose another supported Terraform version or update this
version constraint. Version constraints are normally set for good reason, so
updating the constraint may lead to other errors or unexpected behavior.


Error: Unsupported Terraform Core version

  on .terraform/modules/project-ci-int-pubsub/modules/gsuite_group/versions.tf line 18, in terraform:
  18:   required_version = "~> 0.12.6"

Module module.project-ci-int-pubsub.module.gsuite_group (from
./modules/gsuite_group) does not support Terraform version 0.13.5. To proceed,
either choose another supported Terraform version or update this version
constraint. Version constraints are normally set for good reason, so updating
the constraint may lead to other errors or unexpected behavior.


Error: Unsupported Terraform Core version

  on .terraform/modules/project-ci-int-pubsub/modules/project_services/versions.tf line 18, in terraform:
  18:   required_version = "~> 0.12.6"

Module
module.project-ci-int-pubsub.module.project-factory.module.project_services
(from ../project_services) does not support Terraform version 0.13.5. To
proceed, either choose another supported Terraform version or update this
version constraint. Version constraints are normally set for good reason, so
updating the constraint may lead to other errors or unexpected behavior.

make: *** [docker_test_prepare] Error 1

Hi @mkaramosly
Looks like we have not pinned the developer tools image to 0.12.x and hence its is trying to use 0.13. Could you pin the Makefile to the 12.x latest via

- DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0
+ DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.12

DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0

@bharathkkb
Is there a way to have the test working without mentioning the billing account id?

Hi @mkaramosly
Unfortunately this requires a billing account to associate the test project with billing. One of our improvements in the roadmap is to make it easier by allowing you to specify a project id.

If you wanted to do this today, I would remove

module "project-ci-int-pubsub" {

and then just enable APIs and pass in the project id to other resources in setup like
project = module.project-ci-int-pubsub.project_id

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days