-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add policy_exception field_values_map (#619)
Deprecates field_value_map for field_values_map. The data type needs to change for the exceptions to take effect. By deprecating field_value_map instead of changing it we will not introduce a breaking change, corrupt any current state, and avoid any required code changes due to breakage.
- Loading branch information
Showing
5 changed files
with
199 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
50 changes: 50 additions & 0 deletions
50
examples/resource_lacework_policy_exception/current/main.tf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
terraform { | ||
required_providers { | ||
lacework = { | ||
source = "lacework/lacework" | ||
} | ||
} | ||
} | ||
|
||
resource "lacework_policy_exception" "example" { | ||
policy_id = "lacework-global-39" | ||
description = var.description | ||
constraint { | ||
field_key = var.field_key | ||
field_values = ["*"] | ||
} | ||
|
||
constraint { | ||
field_key = "resourceTags" | ||
field_values_map { | ||
key = "test" | ||
value = ["test", "test"] | ||
} | ||
} | ||
} | ||
|
||
variable "policy_id" { | ||
type = string | ||
default = "lacework-global-46" | ||
} | ||
variable "field_key" { | ||
type = string | ||
default = "accountIds" | ||
} | ||
variable "field_values" { | ||
type = list(string) | ||
default = ["*"] | ||
} | ||
|
||
variable "description" { | ||
type = string | ||
default = "Policy Exception Created via Terraform" | ||
} | ||
|
||
output "description" { | ||
value = lacework_policy_exception.example.description | ||
} | ||
|
||
output "policy_id" { | ||
value = lacework_policy_exception.example.policy_id | ||
} |
File renamed without changes.
This file contains 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
This file contains 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