-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ add terraform.plan.variables #5113
Conversation
Signed-off-by: Salim Afiune Maya <afiune@mondoo.com>
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Salim Afiune Maya <afiune@mondoo.com>
This comment has been minimized.
This comment has been minimized.
@@ -167,6 +167,12 @@ terraform.plan { | |||
terraformVersion string | |||
// Resource changes | |||
resourceChanges() []terraform.plan.resourceChange | |||
// Variables used to generate the Terraform plan | |||
variables []terraform.plan.variable | |||
// Indicates if the plan is applyable or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Indicates if the plan is applyable or not | |
// Whether `apply` is valid for the plan |
As much fun as it can be to make up words, how's this alternative? 😁
variables []terraform.plan.variable | ||
// Indicates if the plan is applyable or not | ||
applyable bool | ||
// Indicates if the plan errored or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Indicates if the plan errored or not | |
// Whether the plan errored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!! I was following patterns in other places within this file, maybe we need a massive update in a few other providers 😅
Signed-off-by: Salim Afiune Maya <afiune@mondoo.com>
This comment has been minimized.
This comment has been minimized.
// Variables used to generate the Terraform plan | ||
variables []terraform.plan.variable | ||
// Whether `apply` is valid for the plan | ||
applyable bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe canApply
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed and agreed that applyable
is coming from Terraform plan output itself, so we will adopt the same name for consistency. cc @misterpantz
Signed-off-by: Salim Afiune Maya <afiune@mondoo.com>
This change adds
terraform.plan.variables
to our terraform provider for a plan connection.Using the test data added, when running cnquery shell, we now get:
This allows us to write queries like: