Skip to content

Commit

Permalink
Update terraform provider
Browse files Browse the repository at this point in the history
  • Loading branch information
impart-security committed Oct 30, 2024
1 parent 9eb32df commit 1ac8512
Show file tree
Hide file tree
Showing 57 changed files with 6,631 additions and 130 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [0.9.0] - 2024-10-29

### Added

- impart_label resource
- impart_tag_metadata resource
- labels attribute to rule scripts, rule test cases, lists, monitors, tags
- description attribute to test cases messages and assertions

## [0.8.3] - 2024-09-12

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource "impart_rule_script" "example" {
Run the following command to build & install the provider

```shell
make
make install
```

### Test provider
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.3
0.9.0
36 changes: 36 additions & 0 deletions docs/resources/label.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "impart_label Resource - impart"
subcategory: ""
description: |-
---

# impart_label (Resource)



## Example Usage

```terraform
# Create a new label
resource "impart_label" "example" {
slug = "example"
display_name = "Example"
description = "example label"
color = "red"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `slug` (String) Slug of the label.

### Optional

- `color` (String) The color of the label.
- `description` (String) The description of the label.
- `display_name` (String) The display name of the label.
1 change: 1 addition & 0 deletions docs/resources/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ resource "impart_list" "example" {

- `functionality` (String) The list functionality. Allowed values are add, add/remove.
- `items` (Attributes List) The list items. (see [below for nested schema](#nestedatt--items))
- `labels` (List of String) The applied labels.
- `subkind` (String) The list subkind.

### Read-Only
Expand Down
4 changes: 4 additions & 0 deletions docs/resources/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ resource "impart_monitor" "test_metric" {
- `name` (String) The name for this monitor.
- `notification_template_ids` (List of String) An array of notification template ids for the templates that will send notifications to their respective connectors.

### Optional

- `labels` (List of String) The applied labels.

### Read-Only

- `id` (String) Identifier for this monitor.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/rule_script.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ resource "impart_rule_script" "example_content" {
- `blocking_effect` (String) The rule blocking effect. Allowed values: block, simulate. If not set effect will be block.
- `content` (String) The rule body content.
- `description` (String) The description for this rule script.
- `labels` (List of String) The applied labels.
- `source_file` (String) The rule source file.
- `source_hash` (String) The rule source hash.

Expand Down
3 changes: 3 additions & 0 deletions docs/resources/rule_test_case.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ resource "impart_rule_test_case" "example" {

- `assertions` (Attributes List) The assertions of the test case. (see [below for nested schema](#nestedatt--assertions))
- `description` (String) The description of the test case.
- `labels` (List of String) The applied labels.
- `required` (Boolean) Sets if test case required to pass on update.

### Read-Only
Expand All @@ -97,6 +98,7 @@ Optional:

- `count` (Number) The number of times to include the message in the test case.
- `delay` (Number) The delay in milliseconds between message iterations.
- `description` (String) The description of the test case message.
- `post_delay` (Number) The delay in milliseconds after a set of message iterations.

<a id="nestedatt--messages--req"></a>
Expand Down Expand Up @@ -156,4 +158,5 @@ Accepted values per assertion type:
**tags**: contains, not_contains.
**status_code**: equal, not_equal, greater_than, less_than, one_of.
**block**: N/A
- `description` (String) The description of the assertion.
- `location` (String) The location of the assertion. Allowed values: req, res. Not applicable for assertion type output.
40 changes: 40 additions & 0 deletions docs/resources/tag_metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "impart_tag_metadata Resource - impart"
subcategory: ""
description: |-
---

# impart_tag_metadata (Resource)



## Example Usage

```terraform
# Create a new tag metadata
resource "impart_tag_metadata" "example" {
name = "tag"
description = "tag description"
external_url = "http://example.com"
labels = [
resource.impart_label.example.slug,
]
risk_statement = "risk statement"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) The tag name.

### Optional

- `description` (String) The description for the tag.
- `external_url` (String) The external URL for the tag.
- `labels` (List of String) The applied labels.
- `risk_statement` (String) The risk statement for the tag.
7 changes: 7 additions & 0 deletions examples/resources/impart_label/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Create a new label
resource "impart_label" "example" {
slug = "example"
display_name = "Example"
description = "example label"
color = "red"
}
10 changes: 10 additions & 0 deletions examples/resources/impart_tag_metadata/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Create a new tag metadata
resource "impart_tag_metadata" "example" {
name = "tag"
description = "tag description"
external_url = "http://example.com"
labels = [
resource.impart_label.example.slug,
]
risk_statement = "risk statement"
}
36 changes: 18 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/impart-security/terraform-provider-impart

go 1.23.1
go 1.23.2

require (
github.com/hashicorp/terraform-plugin-docs v0.19.4
github.com/hashicorp/terraform-plugin-framework v1.11.0
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
github.com/hashicorp/terraform-plugin-go v0.23.0
github.com/hashicorp/terraform-plugin-framework v1.12.0
github.com/hashicorp/terraform-plugin-framework-validators v0.14.0
github.com/hashicorp/terraform-plugin-go v0.24.0
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-testing v1.10.0
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
Expand All @@ -20,14 +20,14 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton // indirect
github.com/ProtonMail/go-crypto v1.1.0-beta.0-proton // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/cloudflare/circl v1.4.0 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/cloudflare/circl v1.5.0 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/go-test/deep v1.0.4 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
Expand All @@ -39,19 +39,19 @@ require (
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.1 // indirect
github.com/hashicorp/go-plugin v1.6.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hc-install v0.8.0 // indirect
github.com/hashicorp/hc-install v0.9.0 // indirect
github.com/hashicorp/hcl/v2 v2.22.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.22.1 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand All @@ -74,18 +74,18 @@ require (
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.15.0 // indirect
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/tools v0.25.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc v1.66.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 1ac8512

Please sign in to comment.