StackGuardian / StackGuardian/tirith
Support multiple `resource_type` for terraform_plan provider operations
Open
Nobody has claimed this yet.
enhancement
help wanted
- Dominant language
- Python
- Stars
- 165
- Forks
- 42
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 11
Description
- All operator '*' is possible for the resource_type
- Multiselector (multiple types) can be selected for the resource_type
e.g.
{
"evaluators": [
{
"description": "VPC needs to have one tag with key:'costcenter' and any value ",
"condition": {
"type": "IsNotEmpty",
"value": "",
"error_tolerance": 1
},
"id": "eval-id-1",
"provider_args": {
"operation_type": "attribute",
"terraform_resource_attribute": "tags.costcenter",
"terraform_resource_type": "*"
}
},
{
"id": "eval-id-2",
"description": "",
"provider_args": {
"operation_type": "action",
"terraform_resource_type": ["aws_vpc", "aws_ec2"]
},
"condition": {
"type": "Equals",
"value": "create",
"error_tolerance": 1
}
}
],
"meta": {
"required_provider": "stackguardian/terraform_plan",
"version": "v1"
},
"eval_expression": "eval-id-1 || eval-id-2"
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the terraform_plan provider operation handling and trace how provider_args parses terraform_resource_type for attribute and action operations. Done means both the '*' wildcard and a list of resource types, such as ["aws_vpc", "aws_ec2"], are accepted and evaluated as specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, terraform
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100