Skip to content

Commit 19c0c52

Browse files
committed
#5: Add tag support
1 parent 971bb93 commit 19c0c52

29 files changed

+427
-113
lines changed

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ provider "konnect" {
2727
* `region` - **(Optional, String)** The region for accessing region specific resources. Can be specified via env variable `KONNECT_REGION`. Allowed values: `us`, `eu`, `au`. Default: `us`
2828
* `num_retries` - **(Optional, Integer)** Number of retries for each Konnect API call in case of 429-Too Many Requests or any 5XX status code. Can be specified via env variable `KONNECT_NUM_RETRIES`. Default: 3.
2929
* `retry_delay` - **(Optional, Integer)** How long to wait (in seconds) in between retries. Can be specified via env variable `KONNECT_RETRY_DELAY`. Default: 30.
30+
* `default_tags` - **(Optional, List of String)** List of tags to assign to all resources created by this provider, if the resource supports tags.

docs/resources/consumer.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ resource "konnect_consumer" "example" {
1616
```
1717
## Argument Reference
1818
* `control_plane_id` - **(Required, String)** The id of the control plane.
19-
* `username` - **(Optional, String)** The unique username of the Consumer.
20-
* `custom_id` - **(Optional, String)** Field for storing an existing unique ID for the Consumer.
19+
* `username` - **(Optional, String)** The unique username of the consumer.
20+
* `custom_id` - **(Optional, String)** Field for storing an existing unique ID for the consumer.
21+
* `tags` - **(Optional, List of String)** An extra list of tags to assign to the consumer in addition to the `default_tags` configured in the provider.
2122
## Attribute Reference
2223
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`
2324
* `consumer_id` - **(String)** Id of the consumer alone
25+
* `all_tags` - **(List of String)** The complete list of tags assigned to the consumer, including the `tags` defined on this resource and the `default_tags` configured in the provider.
2426
## Import
2527
Consumers can be imported using a proper value of `id` as described above

docs/resources/consumer_acl.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ resource "konnect_consumer_acl" "example" {
2222
* `control_plane_id` - **(Required, String)** The id of the control plane.
2323
* `consumer_id` - **(Required, String)** The id of the consumer.
2424
* `group` - **(Required, String)** The ACL group value.
25+
* `tags` - **(Optional, List of String)** An extra list of tags to assign to the ACL in addition to the `default_tags` configured in the provider.
2526
## Attribute Reference
2627
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`acl_id`
2728
* `acl_id` - **(String)** Id of the consumer ACL alone
29+
* `all_tags` - **(List of String)** The complete list of tags assigned to the ACL, including the `tags` defined on this resource and the `default_tags` configured in the provider.
2830
## Import
2931
Consumer ACLs can be imported using a proper value of `id` as described above

docs/resources/consumer_basic.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ resource "konnect_consumer_basic" "example" {
2424
* `consumer_id` - **(Required, String)** The id of the consumer.
2525
* `username` - **(Required, String)** The username value.
2626
* `password` - **(Required, String)** The password value.
27+
* `tags` - **(Optional, List of String)** An extra list of tags to assign to the Basic Auth in addition to the `default_tags` configured in the provider.
2728
## Attribute Reference
2829
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`basic_id`
2930
* `password_hash` - **(String)** Hash of the password
3031
* `basic_id` - **(String)** Id of the consumer basic auth alone
32+
* `all_tags` - **(List of String)** The complete list of tags assigned to the Basic Auth, including the `tags` defined on this resource and the `default_tags` configured in the provider.
3133
## Import
3234
Consumer basics can be imported using a proper value of `id` as described above

docs/resources/consumer_hmac.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ resource "konnect_consumer_hmac" "example" {
2424
* `consumer_id` - **(Required, String)** The id of the consumer.
2525
* `username` - **(Required, String)** The username value.
2626
* `secret` - **(Optional/Computed, String)** The secret value. If left out, a secret will be generated for you.
27+
* `tags` - **(Optional, List of String)** An extra list of tags to assign to the HMAC in addition to the `default_tags` configured in the provider.
2728
## Attribute Reference
2829
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`hmac_id`
2930
* `hmac_id` - **(String)** Id of the consumer HMAC alone
31+
* `all_tags` - **(List of String)** The complete list of tags assigned to the HMAC, including the `tags` defined on this resource and the `default_tags` configured in the provider.
3032
## Import
3133
Consumer HMACs can be imported using a proper value of `id` as described above

docs/resources/consumer_jwt.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ resource "konnect_consumer_jwt" "example" {
2626
* `secret` - **(Optional/Computed, String)** The secret value. If left out, a key will be generated for you.
2727
* `algorithm` - **(Optional, String)** The algorithm for the JWT. Allowed values: `HS256`, `HS384`, `HS512`, `RS256`, `RS384`, `RS512`, `ES256`, `ES384`. Default: `HS256`
2828
* `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`.
29+
* `tags` - **(Optional, List of String)** An extra list of tags to assign to the JWT in addition to the `default_tags` configured in the provider.
2930
## Attribute Reference
3031
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`jwt_id`
3132
* `jwt_id` - **(String)** Id of the consumer JWT alone
33+
* `all_tags` - **(List of String)** The complete list of tags assigned to the JWT, including the `tags` defined on this resource and the `default_tags` configured in the provider.
3234
## Import
3335
Consumer JWTs can be imported using a proper value of `id` as described above

docs/resources/consumer_key.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ resource "konnect_consumer_key" "example" {
2222
* `control_plane_id` - **(Required, String)** The id of the control plane.
2323
* `consumer_id` - **(Required, String)** The id of the consumer.
2424
* `key` - **(Optional/Computed, String)** The API key value. If left out, a key will be generated for you.
25+
* `tags` - **(Optional, List of String)** An extra list of tags to assign to the API key in addition to the `default_tags` configured in the provider.
2526
## Attribute Reference
2627
* `id` - **(String)** Same as `control_plane_id`:`consumer_id`:`key_id`
2728
* `key_id` - **(String)** Id of the consumer API key alone
29+
* `all_tags` - **(List of String)** The complete list of tags assigned to the API key, including the `tags` defined on this resource and the `default_tags` configured in the provider.
2830
## Import
2931
Consumer keys can be imported using a proper value of `id` as described above

docs/resources/plugin.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ EOF
2828
* `service_id` - **(Optional, String)** If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified service.
2929
* `route_id` - **(Optional, String)** If set, the plugin will only activate when receiving requests via the specified route.
3030
* `consumer_id` - **(Optional, String)** If set, the plugin will activate only for requests where the specified consumer has been authenticated.
31+
* `tags` - **(Optional, List of String)** An extra list of tags to assign to the plugin in addition to the `default_tags` configured in the provider.
3132
## Attribute Reference
3233
* `id` - **(String)** Same as `control_plane_id`:`plugin_id`
3334
* `plugin_id` - **(String)** Id of the plugin alone
3435
* `config_all_json` - **(JSON)** The full configuration properties for the plugin, including all properties with their default values not specified in `config`.
36+
* `all_tags` - **(List of String)** The complete list of tags assigned to the plugin, including the `tags` defined on this resource and the `default_tags` configured in the provider.
3537
## Import
3638
Plugins can be imported using a proper value of `id` as described above

docs/resources/route.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ resource "konnect_route" "example" {
4141
* `request_buffering` - **(Optional, Boolean)** Whether to enable request body buffering. Default: `true`
4242
* `response_buffering` - **(Optional, Boolean)** Whether to enable response body buffering. Default: `true`
4343
* `header` - **(Optional, set{header})** Configuration block for a header. Can be specified multiple times for each header. Each block supports the fields documented below.
44+
* `tags` - **(Optional, List of String)** An extra list of tags to assign to the route in addition to the `default_tags` configured in the provider.
4445
### header
4546
* `name` - **(Required, String)** Name of header this route should require.
4647
* `values` - **(Required, List of String)** Allowed values this header should equal.
4748
## Attribute Reference
4849
* `id` - **(String)** Same as `control_plane_id`:`route_id`
4950
* `route_id` - **(String)** Id of the route alone
51+
* `all_tags` - **(List of String)** The complete list of tags assigned to the route, including the `tags` defined on this resource and the `default_tags` configured in the provider.
5052
## Import
5153
Routes can be imported using a proper value of `id` as described above

docs/resources/service.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ resource "konnect_service" "example" {
2626
* `read_timeout` - **(Optional, Integer)** The timeout in milliseconds between two successive read operations for transmitting a request to the host. Default: `60000`
2727
* `write_timeout` - **(Optional, Integer)** The timeout in milliseconds between two successive write operations for transmitting a request to the host. Default: `60000`
2828
* `enabled` - **(Optional, Boolean)** Whether the service is active. Default: `true`
29+
* `tags` - **(Optional, List of String)** An extra list of tags to assign to the service in addition to the `default_tags` configured in the provider.
2930
## Attribute Reference
3031
* `id` - **(String)** Same as `control_plane_id`:`service_id`
3132
* `service_id` - **(String)** Id of the service alone
33+
* `all_tags` - **(List of String)** The complete list of tags assigned to the service, including the `tags` defined on this resource and the `default_tags` configured in the provider.
3234
## Import
3335
Services can be imported using a proper value of `id` as described above

0 commit comments

Comments
 (0)