Skip to content

Commit

Permalink
Merge pull request #19 from getindata/fix/custom_role_enabled_logic
Browse files Browse the repository at this point in the history
fix: Custom role enabled parameter logic
  • Loading branch information
dgniewek authored Jul 31, 2024
2 parents 86a84c0 + 7b20cbf commit 98a5e3f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
args: ["."]

- repo: https://github.com/bridgecrewio/checkov.git
rev: "3.2.213" # Get the latest from: https://github.com/bridgecrewio/checkov/releases
rev: "3.2.216" # Get the latest from: https://github.com/bridgecrewio/checkov/releases
hooks:
- id: checkov
args: [--skip-check, "CKV_TF_1"] # Terraform module sources do not use a git url with a commit hash revision
Expand Down
13 changes: 0 additions & 13 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# config {
# ignore_module = {
# "Invicton-Labs/deepmerge/null" = true
# }
# }

plugin "terraform" {
enabled = true
version = "0.5.0"
source = "github.com/terraform-linters/tflint-ruleset-terraform"
preset = "all"
}

rule "terraform_standard_module_structure" {
enabled = false # Fails on context.tf
}
4 changes: 3 additions & 1 deletion examples/simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ No providers.

## Requirements

No requirements.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |

## Resources

Expand Down
3 changes: 3 additions & 0 deletions examples/simple/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 1.3"
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module "snowflake_custom_role" {

name = each.key
attributes = ["RMN", one(snowflake_resource_monitor.this[*].name)]
enabled = local.create_default_roles && lookup(each.value, "enabled", true)
enabled = lookup(each.value, "enabled", true)
descriptor_name = lookup(each.value, "descriptor_name", "snowflake-role")

role_ownership_grant = lookup(each.value, "role_ownership_grant", "SYSADMIN")
Expand Down

0 comments on commit 98a5e3f

Please sign in to comment.