Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Update to autogenerated resource definitions #24

Merged
merged 6 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Quant Provider

The Quant provider allows you to manage resources in your Quant CDN environment.

## Example Usage

```hcl
provider "quant" {
bearer = "fxj1eivEXhKdIEVGuKkfrcfv4WeEQ8uqqNqEeIEy4zEb6hlz8Tj1SdRxdc9x"
organization = "quant"
}
```

# Required configuration

- `bearer` - The bearer token for authentication.
- `organization` - The organization name.
19 changes: 19 additions & 0 deletions docs/resources/header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Header Resource

Manages a Quant custom headers.

## Example Usage

```hcl
resource "quant_header" "test" {
project = "default"
headers = {
"X-Quant-Header" = "test"
}
}
```

## Argument Reference

- `project` - (Required) The machine name of the project.
- `headers` - (Required) The headers to set.
20 changes: 20 additions & 0 deletions docs/resources/project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Project Resource

Manages a Quant project.

## Example Usage

```hcl
resource "quant_project" "test-terraform" {
name = "tf test 7"
}
```

## Argument Reference

- `name` - (Required) The name of the project.

## Attributes Reference

- `id` - The ID of the project.

42 changes: 42 additions & 0 deletions docs/resources/rule_proxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Rule Proxy Resource

Manages a Quant proxy rule.

## Example Usage

```hcl
resource "quant_rule_proxy" "test" {
name = "test-rule"
project = "default"
domain = ["example.com"]
to = "https://backend.example.com"
host = "backend.example.com"
waf_enabled = true
waf_config {
mode = "report"
paranoia_level = 1
allow_rules = []
block_ip = []
block_ua = []
block_referer = []
notify_email = []
httpbl {
enabled = false
}
}
}
```

## Argument Reference

- `name` - (Required) The name of the rule.
- `project` - (Required) The machine name of the project.
- `domain` - (Required) The domain to apply the rule to.
- `to` - (Required) The target URL to proxy requests to.
- `host` - (Required) The host to apply the rule to.
- `waf_enabled` - (Required) Whether to enable WAF for the rule.
- `waf_config` - (Required) The WAF configuration for the rule.

## Attributes Reference

- `id` - The ID of the rule.
28 changes: 28 additions & 0 deletions docs/resources/rule_redirect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Rule Redirect Resource

Manages a Quant redirect rule.

## Example Usage

```hcl
resource "quant_rule_redirect" "test" {
name = "test-rule"
project = "default"
domain = ["example.com"]
to = "https://example.com"
status_code = 301
}
```

## Argument Reference

- `name` - (Required) The name of the rule.
- `project` - (Required) The machine name of the project.
- `domain` - (Required) The domain to apply the rule to.
- `to` - (Required) The target URL to redirect requests to.
- `status_code` - (Required) The status code to use for the redirect.


## Attributes Reference

- `id` - The ID of the rule.
44 changes: 37 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,61 @@ require (
github.com/hashicorp/terraform-plugin-framework v1.12.0
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
github.com/hashicorp/terraform-plugin-go v0.24.0
github.com/quantcdn/quant-admin-go v0.0.0-20241004021219-be391125750c
github.com/hashicorp/terraform-plugin-testing v1.10.0
github.com/quantcdn/quant-admin-go v0.0.0-20241115034118-d5bee8cc24e8
github.com/stretchr/testify v1.9.0
)

require (
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
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-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/hcl/v2 v2.21.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-log v0.9.0 // 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/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.15.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/grpc v1.66.2 // indirect
google.golang.org/protobuf v1.34.2 // indirect
Expand Down
Loading