Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
scastrianni committed Jan 6, 2024
1 parent 9e10be1 commit 0f123dc
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/resources/consumer_acl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
subcategory: "Runtime Configuration"
---
# Resource: konnect_consumer_acl
Represents an ACL credential for a consumer within a control plane
## Example usage
```hcl
data "konnect_control_plane" "ControlPlane" {
name = "TestControlPlane"
}
data "konnect_consumer" "Consumer" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
search_username = "Bob"
}
resource "konnect_consumer_acl" "example" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
consumer_id = data.konnect_consumer.Consumer.consumer_id
group = "my-acl-group"
}
```
## Argument Reference
* `control_plane_id` - **(Required, String)** The id of the control plane.
* `consumer_id` - **(Required, String)** The id of the consumer.
* `group` - **(Required, String)** The ACL group value.
## Attribute Reference
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`acl_id`
* `acl_id` - **(String)** Id of the consumer ACL alone
## Import
Consumer ACLs can be imported using a proper value of `id` as described above
32 changes: 32 additions & 0 deletions docs/resources/consumer_basic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
subcategory: "Runtime Configuration"
---
# Resource: konnect_consumer_basic
Represents a basic auth credential for a consumer within a control plane
## Example usage
```hcl
data "konnect_control_plane" "ControlPlane" {
name = "TestControlPlane"
}
data "konnect_consumer" "Consumer" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
search_username = "Bob"
}
resource "konnect_consumer_basic" "example" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
consumer_id = data.konnect_consumer.Consumer.consumer_id
username = "my-username"
password = "my-password"
}
```
## Argument Reference
* `control_plane_id` - **(Required, String)** The id of the control plane.
* `consumer_id` - **(Required, String)** The id of the consumer.
* `username` - **(Required, String)** The username value.
* `password` - **(Required, String)** The password value.
## Attribute Reference
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`basic_id`
* `password_hash` - **(String)** Hash of the password
* `basic_id` - **(String)** Id of the consumer basic auth alone
## Import
Consumer basics can be imported using a proper value of `id` as described above
31 changes: 31 additions & 0 deletions docs/resources/consumer_hmac.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
subcategory: "Runtime Configuration"
---
# Resource: konnect_consumer_hmac
Represents an HMAC credential for a consumer within a control plane
## Example usage
```hcl
data "konnect_control_plane" "ControlPlane" {
name = "TestControlPlane"
}
data "konnect_consumer" "Consumer" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
search_username = "Bob"
}
resource "konnect_consumer_hmac" "example" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
consumer_id = data.konnect_consumer.Consumer.consumer_id
username = "my-username"
secret = "my-secret"
}
```
## Argument Reference
* `control_plane_id` - **(Required, String)** The id of the control plane.
* `consumer_id` - **(Required, String)** The id of the consumer.
* `username` - **(Required, String)** The username value.
* `secret` - **(Optional/Computed, String)** The secret value. If left out, a secret will be generated for you.
## Attribute Reference
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`hmac_id`
* `hmac_id` - **(String)** Id of the consumer HMAC alone
## Import
Consumer HMACs can be imported using a proper value of `id` as described above
33 changes: 33 additions & 0 deletions docs/resources/consumer_jwt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
subcategory: "Runtime Configuration"
---
# Resource: konnect_consumer_jwt
Represents a JWT credential for a consumer within a control plane
## Example usage
```hcl
data "konnect_control_plane" "ControlPlane" {
name = "TestControlPlane"
}
data "konnect_consumer" "Consumer" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
search_username = "Bob"
}
resource "konnect_consumer_jwt" "example" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
consumer_id = data.konnect_consumer.Consumer.consumer_id
key = "my-key"
secret = "my-secret"
}
```
## Argument Reference
* `control_plane_id` - **(Required, String)** The id of the control plane.
* `consumer_id` - **(Required, String)** The id of the consumer.
* `key` - **(Optional/Computed, String)** The key value. If left out, a key will be generated for you.
* `secret` - **(Optional/Computed, String)** The secret value. If left out, a key will be generated for you.
* `algorithm` - **(Optional, String)** The algorithm for the JWT. Allowed values: `HS256`, `HS384`, `HS512`, `RS256`, `RS384`, `RS512`, `ES256`, `ES384`. Default: `HS256`
* `rsa_public_key` - **(Optional, String)** The RSA public key in PEM format for the JWT. Required if `algorithm` is `RS256`, `RS384`, `RS512`, `ES256`, or `ES384`.
## Attribute Reference
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`jwt_id`
* `jwt_id` - **(String)** Id of the consumer JWT alone
## Import
Consumer JWTs can be imported using a proper value of `id` as described above
29 changes: 29 additions & 0 deletions docs/resources/consumer_key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
subcategory: "Runtime Configuration"
---
# Resource: konnect_consumer_key
Represents an API key credential for a consumer within a control plane
## Example usage
```hcl
data "konnect_control_plane" "ControlPlane" {
name = "TestControlPlane"
}
data "konnect_consumer" "Consumer" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
search_username = "Bob"
}
resource "konnect_consumer_key" "example" {
control_plane_id = data.konnect_control_plane.ControlPlane.id
consumer_id = data.konnect_consumer.Consumer.consumer_id
key = "my-api-key"
}
```
## Argument Reference
* `control_plane_id` - **(Required, String)** The id of the control plane.
* `consumer_id` - **(Required, String)** The id of the consumer.
* `key` - **(Optional/Computed, String)** The API key value. If left out, a key will be generated for you.
## Attribute Reference
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`key_id`
* `key_id` - **(String)** Id of the consumer API key alone
## Import
Consumer keys can be imported using a proper value of `id` as described above

0 comments on commit 0f123dc

Please sign in to comment.