Skip to content

Commit

Permalink
Merge pull request #24 from quantcdn/feat/update-quant-sdk
Browse files Browse the repository at this point in the history
Feat: Update to autogenerated resource definitions
  • Loading branch information
steveworley authored Dec 6, 2024
2 parents 8634384 + e6fbef7 commit e8375f2
Show file tree
Hide file tree
Showing 22 changed files with 3,688 additions and 9,409 deletions.
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

0 comments on commit e8375f2

Please sign in to comment.