Selectevly suggest to run ghpc export-outputs#1964
Merged
Conversation
mr0re1
commented
Nov 11, 2023
Collaborator
tpdownes
approved these changes
Nov 14, 2023
tpdownes
left a comment
Contributor
There was a problem hiding this comment.
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.
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.
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.