-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add LA note and update app users
- Loading branch information
1 parent
b8ffb09
commit 74d50a0
Showing
12 changed files
with
140 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,37 +3,47 @@ | |
page_title: "aiven_organization_application_user Resource - terraform-provider-aiven" | ||
subcategory: "" | ||
description: |- | ||
Creates and manages an organization application user. Application users can be used for programmatic access to the platform. This features is in the limited availability stage. Contact [email protected] to try this feature. | ||
This resource is in beta and may change without notice. To use this resource, | ||
set the PROVIDER_AIVEN_ENABLE_BETA environment variable to true. | ||
Creates and manages an organization application user. Application users https://aiven.io/docs/platform/howto/manage-application-users can be used for programmatic access to the platform. | ||
This resource is in the limited availability stage and may change without notice. To enable this feature, | ||
contact the sales team mailto:[email protected]. After it's enabled you can use this resource by | ||
setting the PROVIDER_AIVEN_ENABLE_BETA environment variable to true. | ||
--- | ||
|
||
# aiven_organization_application_user (Resource) | ||
|
||
Creates and manages an organization application user. Application users can be used for programmatic access to the platform. This features is in the limited availability stage. Contact [email protected] to try this feature. | ||
Creates and manages an organization application user. [Application users](https://aiven.io/docs/platform/howto/manage-application-users) can be used for programmatic access to the platform. | ||
|
||
**This resource is in beta and may change without notice.** To use this resource, | ||
set the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to true. | ||
**This resource is in the limited availability stage and may change without notice.** To enable this feature, | ||
contact the [sales team](mailto:[email protected]). After it's enabled you can use this resource by | ||
setting the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to true. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "aiven_organization_application_user" "tf_user" { | ||
organization_id = aiven_organization.main.id | ||
name = "app-terraform" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Name of the organization application user. | ||
- `organization_id` (String) Identifier of the organization the application user belongs to. | ||
- `name` (String) The name of the application user. | ||
- `organization_id` (String) The ID of the organization the application user belongs to. | ||
|
||
### Optional | ||
|
||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) | ||
|
||
### Read-Only | ||
|
||
- `email` (String) Email of the organization application user. | ||
- `id` (String) Compound identifier of the organization application user. | ||
- `user_id` (String) Identifier of the organization application user. | ||
- `email` (String) An email address automatically generated by Aiven to help identify the application user. | ||
No notifications are sent to this email. | ||
- `id` (String) A compound identifier of the resource in the format `organization_id/user_id`. | ||
- `user_id` (String) The ID of the application user. | ||
|
||
<a id="nestedblock--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
@@ -44,3 +54,11 @@ Optional: | |
- `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. | ||
- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. | ||
- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import aiven_organization_application_user.example ORGANIZATION_ID/USER_ID | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,46 +3,61 @@ | |
page_title: "aiven_organization_application_user_token Resource - terraform-provider-aiven" | ||
subcategory: "" | ||
description: |- | ||
Creates and manages an organization application user token in Aiven. | ||
This resource is in beta and may change without notice. To use this resource, | ||
set the PROVIDER_AIVEN_ENABLE_BETA environment variable to true. | ||
Creates and manages an authentication token for an application user in Aiven. Review the best practices https://aiven.io/docs/platform/concepts/application-users#security-best-practices for securing application users and their tokens. | ||
This resource is in the limited availability stage and may change without notice. To enable this feature, | ||
contact the sales team mailto:[email protected]. After it's enabled you can use this resource by | ||
setting the PROVIDER_AIVEN_ENABLE_BETA environment variable to true. | ||
--- | ||
|
||
# aiven_organization_application_user_token (Resource) | ||
|
||
Creates and manages an organization application user token in Aiven. | ||
Creates and manages an authentication token for an application user in Aiven. Review the [best practices](https://aiven.io/docs/platform/concepts/application-users#security-best-practices) for securing application users and their tokens. | ||
|
||
**This resource is in beta and may change without notice.** To use this resource, | ||
set the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to true. | ||
**This resource is in the limited availability stage and may change without notice.** To enable this feature, | ||
contact the [sales team](mailto:[email protected]). After it's enabled you can use this resource by | ||
setting the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to true. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "aiven_organization_application_user" "tf_user" { | ||
organization_id = aiven_organization.main.id | ||
name = "app-terraform" | ||
} | ||
resource "aiven_organization_application_user_token" "example" { | ||
organization_id = aiven_organization.main.id | ||
user_id = aiven_organization_application_user.tf_user.user_id | ||
description = "Auth token for TF access to Aiven." | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `organization_id` (String) Identifier of the organization the application user token belongs to. | ||
- `user_id` (String) Identifier of the application user the token belongs to. | ||
- `organization_id` (String) The ID of the organization the application user belongs to. | ||
- `user_id` (String) The ID of the application user the token belongs to. | ||
|
||
### Optional | ||
|
||
- `description` (String) Description of the token. | ||
- `extend_when_used` (Boolean) True to extend token expiration time when token is used. Only applicable if max_age_seconds is specified. | ||
- `max_age_seconds` (Number) Time the token remains valid since creation (or since last use if extend_when_used is true). | ||
- `scopes` (Set of String) Scopes this token is restricted to if specified. | ||
- `extend_when_used` (Boolean) Extends the token session duration when the token is used. Only applicable if a value is set for `max_age_seconds`. | ||
- `max_age_seconds` (Number) The number of hours after which a token expires. Default session duration is 10 hours. | ||
- `scopes` (Set of String) Restricts the scopes for this token. | ||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) | ||
|
||
### Read-Only | ||
|
||
- `create_time` (String) Time when the token was created. | ||
- `created_manually` (Boolean) True for tokens explicitly created via the access_tokens API, false for tokens created via login. | ||
- `currently_active` (Boolean) True if API request was made with this access token. | ||
- `expiry_time` (String) Timestamp when the access token will expire unless extended, if ever. | ||
- `created_manually` (Boolean) True for tokens explicitly created using the `access_tokens` API. False for tokens created when a user logs in. | ||
- `currently_active` (Boolean) True if the API request was made with this token. | ||
- `expiry_time` (String) Timestamp when the access token will expire unless extended. | ||
- `full_token` (String, Sensitive) Full token. | ||
- `id` (String) Compound identifier of the organization application user token. | ||
- `id` (String) Compound identifier of the application user's token. | ||
- `last_ip` (String) IP address of the last request made with this token. | ||
- `last_used_time` (String) Timestamp when the access token was last used, if ever. | ||
- `last_used_time` (String) Timestamp when the access token was last used. | ||
- `last_user_agent` (String) User agent of the last request made with this token. | ||
- `last_user_agent_human_readable` (String) User agent of the last request made with this token in human-readable format. | ||
- `token_prefix` (String) Prefix of the token. | ||
|
@@ -56,3 +71,11 @@ Optional: | |
- `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. | ||
- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. | ||
- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import aiven_organization_application_user_token.example ORGANIZATION_ID/USER_ID/TOKEN_PREFIX | ||
``` |
4 changes: 4 additions & 0 deletions
4
examples/data-sources/aiven_organization_application_user/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
data "aiven_organization_application_user" "tf_user" { | ||
organization_id = aiven_organization.main.id | ||
user_id = "u123a456b7890c" | ||
} |
1 change: 1 addition & 0 deletions
1
examples/resources/aiven_organization_application_user/import.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import aiven_organization_application_user.example ORGANIZATION_ID/USER_ID |
4 changes: 4 additions & 0 deletions
4
examples/resources/aiven_organization_application_user/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "aiven_organization_application_user" "tf_user" { | ||
organization_id = aiven_organization.main.id | ||
name = "app-terraform" | ||
} |
1 change: 1 addition & 0 deletions
1
examples/resources/aiven_organization_application_user_token/import.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import aiven_organization_application_user_token.example ORGANIZATION_ID/USER_ID/TOKEN_PREFIX |
10 changes: 10 additions & 0 deletions
10
examples/resources/aiven_organization_application_user_token/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
resource "aiven_organization_application_user" "tf_user" { | ||
organization_id = aiven_organization.main.id | ||
name = "app-terraform" | ||
} | ||
|
||
resource "aiven_organization_application_user_token" "example" { | ||
organization_id = aiven_organization.main.id | ||
user_id = aiven_organization_application_user.tf_user.user_id | ||
description = "Auth token for TF access to Aiven." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,36 +78,38 @@ func (r *organizationApplicationUser) Schema( | |
resp *resource.SchemaResponse, | ||
) { | ||
resp.Schema = util.GeneralizeSchema(ctx, schema.Schema{ | ||
Description: util.BetaDescription("Creates and manages an organization application user. Application users can be used for programmatic access to the platform. This features is in the limited availability stage. Contact [email protected] to try this feature."), | ||
Description: util.LimitedAvailabilityDescription("Creates and manages an organization application user. [Application users](https://aiven.io/docs/platform/howto/manage-application-users) can be used for programmatic access to the platform."), | ||
Attributes: map[string]schema.Attribute{ | ||
"id": schema.StringAttribute{ | ||
Description: "Compound identifier of the organization application user.", | ||
Description: "A compound identifier of the resource in the format `organization_id/user_id`.", | ||
Computed: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.UseStateForUnknown(), | ||
}, | ||
}, | ||
"organization_id": schema.StringAttribute{ | ||
Description: "Identifier of the organization the application user belongs to.", | ||
Description: "The ID of the organization the application user belongs to.", | ||
Required: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.RequiresReplace(), | ||
}, | ||
}, | ||
"user_id": schema.StringAttribute{ | ||
Description: "Identifier of the organization application user.", | ||
Description: "The ID of the application user.", | ||
Computed: true, | ||
PlanModifiers: []planmodifier.String{ | ||
stringplanmodifier.UseStateForUnknown(), | ||
}, | ||
}, | ||
"name": schema.StringAttribute{ | ||
Description: "Name of the organization application user.", | ||
Description: "The name of the application user.", | ||
Required: true, | ||
}, | ||
"email": schema.StringAttribute{ | ||
Description: "Email of the organization application user.", | ||
Computed: true, | ||
Description: `An email address automatically generated by Aiven to help identify the application user. | ||
No notifications are sent to this email. | ||
`, | ||
Computed: true, | ||
}, | ||
}, | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.