Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
missed docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Jul 29, 2022
1 parent 64d0475 commit c0cd353
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 9 deletions.
57 changes: 52 additions & 5 deletions docs/resources/enforcement_rule.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "bridgecrew_enforcement_rule Resource - terraform-provider-bridgecrew"
subcategory: ""
description: |-
layout: "bridgecrew"
page_title: "Bridgecrew: resource_enforcement_rule"
sidebar_current: "docs-bridgecrew-resource_enforcement_rule"

description: |-
Create a new exception rule for a specific set of repositories
---

# bridgecrew_enforcement_rule (Resource)
# bridgecrew_enforcement_rule

Use this resource to create new exception rules for the Bridgecrew platform <https://www.bridgecrew.cloud/incidents>.
For more details on this API see their online API documentation <https://docs.bridgecrew.io/reference/addrule>.





## Example Usage

Basic usage:

This tag group creates a disabled tag group attached only to 2 repos, you can source the repo ids from the
repository datasource.

```hcl
resource "bridgecrew_enforcement_rule" "imported" {
name = "james2"
description = "first terraform"
isenabled = false
tagruleootbid = ""
definition {
tag_groups {
name = "1653659061445_key"
tags {
value = {
default = "name"
}
name = "team2"
}
}
}
repositories = ["00ca7905-d366-470e-9740-3a576fd9b82d","02ecf59e-6cd6-4b14-9c91-816c46211bd2"]
}
```

## Importing existing Tagging Policies

You can import existing platform policies into Terraform code.

```
terraform import bridgecrew_enforcement_rule.imported id
```

You can view the id, either by using the API docs tag list feature:

<https://docs.bridgecrew.io/reference/gettags> or by using the tags datasource.

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
8 changes: 4 additions & 4 deletions scripts/generate-docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ func main() {
name: "resource_tag",
path: tempDir + "/resources/tag.md.tmpl",
},
//{
// name: "resource_enforcement_rule",
// path: tempDir + "/resources/enforcement_rule.md.tmpl",
//},
{
name: "resource_enforcement_rule",
path: tempDir + "/resources/enforcement_rule.md.tmpl",
},
}

var indexPages = []Page{
Expand Down

0 comments on commit c0cd353

Please sign in to comment.