Skip to content

Selectevly suggest to run ghpc export-outputs#1964

Merged
mr0re1 merged 1 commit into
GoogleCloudPlatform:developfrom
mr0re1:plan_json
Nov 14, 2023
Merged

Selectevly suggest to run ghpc export-outputs#1964
mr0re1 merged 1 commit into
GoogleCloudPlatform:developfrom
mr0re1:plan_json

Conversation

@mr0re1

@mr0re1 mr0re1 commented Nov 11, 2023

Copy link
Copy Markdown
Collaborator
$ ./ghpc deploy tst
Testing if deployment group tst/primary requires adding or changing cloud infrastructure
Error: terraform plan for deployment group tst/primary failed; run "ghpc export-outputs" on previous deployment groups to define inputs
exit status 1

Error: No value for required variable

  on variables.tf line 32:
  32: variable "region" {

The root module input variable "region" is not set, and has no default value.
Use a -var or -var-file command line argument to provide a value for this
variable.

...

$ ./ghpc deploy tst
Testing if deployment group tst/primary requires adding or changing cloud infrastructure
Error: terraform plan for deployment group tst/primary failed
exit status 1

Error: Invalid value for variable

  on main.tf line 20, in module "network":
  20:   network_address_range = "over the hills and far away"
    ├────────────────
    │ var.network_address_range is "over the hills and far away"

IP address range must be in CIDR format.

This was checked by the validation rule at
modules/embedded/modules/network/vpc/variables.tf:65,3-13.

@mr0re1 mr0re1 requested a review from tpdownes November 11, 2023 05:28
@mr0re1 mr0re1 added the release-chore To not include into release notes label Nov 11, 2023

@tpdownes tpdownes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the requested comment. I think this is a good MVC for improving plan failures. I think we want to re-think the ghpc deploy/destroy experience within a larger context.

Comment thread pkg/shell/terraform.go
@tpdownes tpdownes assigned mr0re1 and unassigned tpdownes Nov 14, 2023
@tpdownes

Copy link
Copy Markdown
Contributor

For posterity, I tested destroy on a multi-group deployment without any artifacts generated and it produces the existing "try export-outputs" recommendation. Then I tried deploy on a single group deployment and mangled the terraform.tfvars in a similar manner as above.

```sh
$ ./ghpc deploy tst
Testing if deployment group tst/primary requires adding or changing cloud infrastructure
Error: terraform plan for deployment group tst/primary failed; run "ghpc export-outputs" on previous deployment groups to define inputs
exit status 1

Error: No value for required variable

  on variables.tf line 32:
  32: variable "region" {

The root module input variable "region" is not set, and has no default value.
Use a -var or -var-file command line argument to provide a value for this
variable.

...

$ ./ghpc deploy tst
Testing if deployment group tst/primary requires adding or changing cloud infrastructure
Error: terraform plan for deployment group tst/primary failed
exit status 1

Error: Invalid value for variable

  on main.tf line 20, in module "network":
  20:   network_address_range = "over the hills and far away"
    ├────────────────
    │ var.network_address_range is "over the hills and far away"

IP address range must be in CIDR format.

This was checked by the validation rule at
modules/embedded/modules/network/vpc/variables.tf:65,3-13.
```
@mr0re1 mr0re1 enabled auto-merge November 14, 2023 22:12
@mr0re1 mr0re1 merged commit eda5738 into GoogleCloudPlatform:develop Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-chore To not include into release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants