Skip to content

Commit

Permalink
fix: Fix query opreator
Browse files Browse the repository at this point in the history
  • Loading branch information
uanid committed Jan 9, 2024
1 parent 04a69c9 commit e002574
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data "bluechip_accounts" "current" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/cidrs.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ resource "bluechip_cidr" "c2" {
data "bluechip_cidrs" "office" {
namespace = "default"
filter {
operator = "equal"
operator = "equals"
field = "metadata.annotations.office"
value = "true"
}
Expand All @@ -60,7 +60,7 @@ data "bluechip_cidrs" "seoul" {
namespace = "default"
filter {
operator = "equal"
operator = "equals"
field = "metadata.annotations.bluechip.example.com/location"
value = "true"
}
Expand Down Expand Up @@ -90,7 +90,7 @@ data "bluechip_cidrs" "seoul" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/clusterrolebindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data "bluechip_clusterrolebindings" "current" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data "bluechip_clusters" "current" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description: |-
```terraform
data "bluechip_images" "current" {
filter {
operator = "equal"
operator = "equals"
field = "spec.commitHash"
value = "6874ece755439b5b3473b5b910fb4938751d6689"
}
Expand Down Expand Up @@ -46,7 +46,7 @@ data "bluechip_images" "current" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data "bluechip_namespaces" "current" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/oidcauths.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data "bluechip_oidcauths" "current" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/rolebindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description: |-
```terraform
data "bluechip_rolebindings" "current" {
filter {
operator = "equal"
operator = "equals"
key = "metadata.name"
value = ""
}
Expand Down Expand Up @@ -46,7 +46,7 @@ data "bluechip_rolebindings" "current" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data "bluechip_users" "current" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/vendors.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data "bluechip_vendors" "current" {
Required:

- `field` (String) Field to use for the query term.
- `operator` (String) Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `operator` (String) Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].
- `value` (String) Value to use for the query term.


Expand Down
5 changes: 1 addition & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,12 @@ provider "bluechip" {
<a id="nestedblock--aws_auth"></a>
### Nested Schema for `aws_auth`

Required:

- `region` (String)

Optional:

- `access_key` (String)
- `cluster_name` (String)
- `profile` (String)
- `region` (String)
- `secret_access_key` (String)
- `session_token` (String)

Expand Down
4 changes: 2 additions & 2 deletions examples/data-sources/bluechip_cidrs/data-source.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resource "bluechip_cidr" "c2" {
data "bluechip_cidrs" "office" {
namespace = "default"
filter {
operator = "equal"
operator = "equals"
field = "metadata.annotations.office"
value = "true"
}
Expand All @@ -45,7 +45,7 @@ data "bluechip_cidrs" "seoul" {
namespace = "default"

filter {
operator = "equal"
operator = "equals"
field = "metadata.annotations.bluechip.example.com/location"
value = "true"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/data-sources/bluechip_images/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
data "bluechip_images" "current" {
filter {
operator = "equal"
operator = "equals"
field = "spec.commitHash"
value = "6874ece755439b5b3473b5b910fb4938751d6689"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/data-sources/bluechip_rolebindings/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
data "bluechip_rolebindings" "current" {
filter {
operator = "equal"
operator = "equals"
key = "metadata.name"
value = ""
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/bluechip_client/bluechip_models/lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ type ListRequest struct {
}

const OperatorFuzzy = "fuzzy"
const OperatorEquals = "equal"
const OperatorNotEquals = "notEqual"
const OperatorEquals = "equals"
const OperatorNotEquals = "notEquals"
const OperatorWildcard = "wildcard"
const OperatorRegex = "regex"
const OperatorMatchPhrase = "matchPhrase"
Expand Down
2 changes: 1 addition & 1 deletion pkg/framework/fwtype/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (FilterType) Schema() *schema.Schema {
},
"operator": {
Type: schema.TypeString,
Description: "Operator to use for the query term. One of ['equal', 'notEqual', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].",
Description: "Operator to use for the query term. One of ['equals', 'notEquals', 'fuzzy', 'wildcard', 'regex', 'matchPhrase'].",
Required: true,
ValidateFunc: validation.StringInSlice([]string{
bluechip_models.OperatorEquals,
Expand Down

0 comments on commit e002574

Please sign in to comment.