Skip to content

Commit

Permalink
Merge pull request #13 from signalsciences/RenameToAllowBlockLists
Browse files Browse the repository at this point in the history
Rename lists, update docs
  • Loading branch information
jhanrahan-sigsci authored Oct 9, 2020
2 parents 7a2e7cc + 91423a6 commit bb91845
Show file tree
Hide file tree
Showing 24 changed files with 191 additions and 100 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ provider "sigsci" {

[Templated Rules](https://github.com/signalsciences/terraform-provider-sigsci/blob/master/docs/resources/site_templated_rule.md)

[Whitelist](https://github.com/signalsciences/terraform-provider-sigsci/blob/master/docs/resources/site_whitelist.md)
[Allowlist](https://github.com/signalsciences/terraform-provider-sigsci/blob/master/docs/resources/site_allowlist.md)

[Blacklist](https://github.com/signalsciences/terraform-provider-sigsci/blob/master/docs/resources/site_blacklist.md)
[Blocklist](https://github.com/signalsciences/terraform-provider-sigsci/blob/master/docs/resources/site_blocklist.md)

[Header Links](https://github.com/signalsciences/terraform-provider-sigsci/blob/master/docs/resources/site_header_link.md)

Expand Down
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,19 @@ resource "sigsci_site_templated_rule" "test_template_rule" {

##### BlackList
```hcl-terraform
resource "sigsci_site_blacklist" "test" {
resource "sigsci_site_blocklist" "test" {
site_short_name = sigsci_site.my-site.short_name
source = "1.2.3.4"
note = "sample blacklist"
note = "sample blocklist"
}
```

##### Whitelist
##### Allowlist
```hcl-terraform
resource "sigsci_site_whitelist" "test" {
resource "sigsci_site_allowlist" "test" {
site_short_name = sigsci_site.my-site.short_name
source = "1.2.3.4"
note = "sample whitelist"
note = "sample allowlist"
}
```

Expand Down
5 changes: 5 additions & 0 deletions docs/resources/corp_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ resource "sigsci_corp_list" "test" {
- `description` - (Optional) List description
- `entries` - (Required) List entries


### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource

### Import
You can import corp lists with the generic corp import formula

Expand Down
4 changes: 4 additions & 0 deletions docs/resources/corp_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ resource "sigsci_corp_rule" "test" {
- `conditions` - Conditions on which this condition should trigger. Can recursively add this 3 deep.
- `actions` - Action to take when triggered
- `type` - (block, allow, excludeSignal)

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource

### Import
You can import corp rules with the generic corp import formula
Expand Down
7 changes: 7 additions & 0 deletions docs/resources/corp_signal_tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ resource "sigsci_corp_signal_tag" "test" {
### Argument Reference
- `short_name` - (Required) The display name of the signal tag
- `description` - Optional signal tag description

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource
- `configurable` - boolean flag for configurable
- `informational` - boolean flag for informational
- `needs_response` - boolean flag indicating if the tag needs a response

### Import
You can import corp lists with the generic corp import formula
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/site.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ resource "sigsci_site" "my-site" {

### Import
You can import corp lists with the generic corp import formula

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource
- `http_block_code` - HTTP response code to send when traffic is being blocked

Example:
```shell script
Expand Down
4 changes: 4 additions & 0 deletions docs/resources/site_alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ resource "sigsci_site_alert" "test" {

### Import
You can import corp lists with the generic site import formula

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource

Example:
```shell script
Expand Down
10 changes: 7 additions & 3 deletions docs/resources/site_blacklist.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### Example Usage

```hcl-terraform
resource "sigsci_site_blacklist" "test" {
resource "sigsci_site_blocklist" "test" {
site_short_name = sigsci_site.my-site.short_name
source = "1.2.3.4"
note = "sample blacklist"
note = "sample blocklist"
expires = "2012-11-01T22:08:41+00:00"
}
```
Expand All @@ -17,8 +17,12 @@ resource "sigsci_site_blacklist" "test" {

### Import
You can import corp lists with the generic site import formula

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource

Example:
```shell script
terraform import sigsci_site_blacklist.test site_short_name:id
terraform import sigsci_site_blocklist.test site_short_name:id
```
4 changes: 4 additions & 0 deletions docs/resources/site_header_link.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ resource "sigsci_site_header_link" "test" {

### Import
You can import corp lists with the generic site import formula

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource

Example:
```shell script
Expand Down
4 changes: 4 additions & 0 deletions docs/resources/site_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ resource "sigsci_site_list" "test" {
- `description` - Optional list description
- `entries` - (Required) List entries

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource

### Import
You can import corp lists with the generic site import formula

Expand Down
4 changes: 4 additions & 0 deletions docs/resources/site_redaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ resource "sigsci_site_redaction" "test" {
- `field` - (Required) Field name
- `redaction_type` - (Required) Type of redaction (0: Request Parameter, 1: Request Header, 2: Response Header)

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource

### Import
You can import corp lists with the generic site import formula

Expand Down
4 changes: 4 additions & 0 deletions docs/resources/site_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ resource "sigsci_site_rule" "test" {
- `conditions` - Conditions on which this condition should trigger. Can recursively add this 3 deep.
- `actions` - Action to take when triggered
- `type` - (block, allow, excludeSignal)

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource

### Import
You can import corp rules with the generic site import formula
Expand Down
7 changes: 7 additions & 0 deletions docs/resources/site_signal_tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ resource "sigsci_site_signal_tag" "test" {
- `name` - (Required) Field name
- `description` - Type of redaction (0: Request Parameter, 1: Request Header, 2: Response Header)

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource
- `configurable` - boolean flag for configurable
- `informational` - boolean flag for informational
- `needs_response` - boolean flag indicating if the tag needs a response

### Import
You can import corp lists with the generic site import formula

Expand Down
5 changes: 5 additions & 0 deletions docs/resources/site_templated_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ resource "sigsci_site_templated_rule" "test_template_rule" {
- `enabled` - (Required) A flag to toggle this alert.
- `action` - (Required) A flag that describes what happens when the alert is triggered. 'info' creates an incident in the dashboard. 'flagged' creates an incident and blocks traffic for 24 hours.

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource
- `name` - Name of templated rule

### Import
You can import corp lists with the generic site import formula

Expand Down
10 changes: 7 additions & 3 deletions docs/resources/site_whitelist.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### Example Usage

```hcl-terraform
resource "sigsci_site_whitelist" "test" {
resource "sigsci_site_allowlist" "test" {
site_short_name = sigsci_site.my-site.short_name
source = "1.2.2.1"
note = "sample whitelist"
note = "sample allowlist"
}
```

Expand All @@ -14,10 +14,14 @@ resource "sigsci_site_whitelist" "test" {
- `note` - (Required) Note associated with the tag
- `expires` - Optional RFC3339-formatted datetime in the future. Omit this parameter if it does not expire.

### Attributes Reference
In addition to all arguments, the following fields are also available
- `id` - the identifier of the resource

### Import
You can import corp lists with the generic site import formula

Example:
```shell script
terraform import sigsci_site_whitelist.test site_short_name:id
terraform import sigsci_site_allowlist.test site_short_name:id
```
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ resource "sigsci_site_rule" "test" {
}
}

resource "sigsci_site_blacklist" "test" {
resource "sigsci_site_blocklist" "test" {
site_short_name = sigsci_site.my-site.short_name
source = "1.2.3.4"
note = "sample blacklist"
note = "sample blocklist"
}

resource "sigsci_site_header_link" "test_header_link" {
Expand All @@ -174,10 +174,10 @@ resource "sigsci_site_header_link" "test_header_link" {
link = "https://www.signalsciences.net"
}

resource "sigsci_site_whitelist" "test" {
resource "sigsci_site_allowlist" "test" {
site_short_name = sigsci_site.my-site.short_name
source = "1.2.2.1"
note = "sample whitelistt"
note = "sample allowlistt"
}

resource "sigsci_site_redaction" "test_redaction" {
Expand Down
8 changes: 4 additions & 4 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ func Provider() terraform.ResourceProvider {
"sigsci_site_alert": resourceSiteAlert(),
"sigsci_site_templated_rule": resourceSiteTemplatedRule(),
"sigsci_site_rule": resourceSiteRule(),
"sigsci_site_blacklist": resourceSiteBlacklist(),
"sigsci_site_whitelist": resourceSiteWhitelist(),
"sigsci_site_monitor": resourceSiteMonitor(),
"sigsci_site_header_link": resourceSiteHeaderLink(),
"sigsci_site_blocklist": resourceSiteBlocklist(),
"sigsci_site_allowlist": resourceSiteAllowlist(),
//"sigsci_site_monitor": resourceSiteMonitor(),
"sigsci_site_header_link": resourceSiteHeaderLink(),
//"sigsci_site_integration": resourceSiteIntegration(),
"sigsci_corp_list": resourceCorpList(),
"sigsci_corp_rule": resourceCorpRule(),
Expand Down
2 changes: 1 addition & 1 deletion provider/resource_site.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func resourceSite() *schema.Resource {
},
"block_http_code": {
Type: schema.TypeInt,
Description: "HTTP response code to send when when traffic is being blocked",
Description: "HTTP response code to send when traffic is being blocked",
Computed: true,
//Default: 406,
},
Expand Down
Loading

0 comments on commit bb91845

Please sign in to comment.