Skip to content

Commit

Permalink
bug: [OPA-1393]: Add example for policyset with more than 1 policy, v…
Browse files Browse the repository at this point in the history
…ia terraform
  • Loading branch information
yagyanshbhatia committed Jun 1, 2023
1 parent 82ad12d commit 1e9538c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
21 changes: 20 additions & 1 deletion docs/resources/platform_policyset.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,26 @@ resource "harness_platform_policyset" "test" {
type = "pipeline"
enabled = true
policies {
identifier = "always_run"
identifier = "policy_identifier"
severity = "warning"
}
}
## Policyset with multiple policies
resource "harness_platform_policyset" "test" {
identifier = "harness_platform_policyset.test.identifier"
name = "harness_platform_policyset.test.name"
action = "onrun"
type = "pipeline"
enabled = true
org_id = "terraform_example_org"
project_id = "terraform_test_project"
policies {
identifier = "policy_identifier1"
severity = "warning"
}
policies {
identifier = "policy_identifier2"
severity = "warning"
}
}
Expand Down
21 changes: 20 additions & 1 deletion examples/resources/harness_platform_policyset/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,26 @@ resource "harness_platform_policyset" "test" {
type = "pipeline"
enabled = true
policies {
identifier = "always_run"
identifier = "policy_identifier"
severity = "warning"
}
}

## Policyset with multiple policies
resource "harness_platform_policyset" "test" {
identifier = "harness_platform_policyset.test.identifier"
name = "harness_platform_policyset.test.name"
action = "onrun"
type = "pipeline"
enabled = true
org_id = "terraform_example_org"
project_id = "terraform_test_project"
policies {
identifier = "policy_identifier1"
severity = "warning"
}
policies {
identifier = "policy_identifier2"
severity = "warning"
}
}

0 comments on commit 1e9538c

Please sign in to comment.