Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
korenyoni committed Oct 1, 2023
1 parent 3c413f4 commit d1beb61
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 0 deletions.
65 changes: 65 additions & 0 deletions docs/resources/account_user_association.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
page_title: "codefresh_account_user_association Resource - terraform-provider-codefresh"
subcategory: ""
description: |-
Associates a user with the account which the provider is authenticated against. If the user is not present in the system, an invitation will be sent to the specified email address.
---

# codefresh_account_user_association (Resource)

Associates a user with the account which the provider is authenticated against. If the user is not present in the system, an invitation will be sent to the specified email address.

See the [documentation](https://codefresh.io/docs/docs/administration/account-user-management/add-users/#users-in-codefresh).

## Example usage

```hcl
locals {
users = {
ed = {
email = "[email protected]",
admin = true,
}
edd = {
email = "[email protected]",
admin = true,
}
eddy = {
email = "[email protected]",
admin = false,
}
}
}
resource "codefresh_account_user_association" "users" {
for_each = local.users,
email = each.value.email,
admin = each.value.admin,
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `email` (String) The email of the user to associate with the specified account.
If the user is not present in the system, an invitation will be sent to this email.
This field can only be changed when 'status' is 'pending'.

### Optional

- `admin` (Boolean) Whether to make this user an account admin.

### Read-Only

- `id` (String) The ID of this resource.
- `status` (String) The status of the association.

## Import

An existing account user association can be imported via the user ID:

```sh
terraform import codefresh_account_user_association.test_user xxxxxxxxxxxxxxxxxxx
```
49 changes: 49 additions & 0 deletions templates/resources/account_user_association.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

See the [documentation](https://codefresh.io/docs/docs/administration/account-user-management/add-users/#users-in-codefresh).

## Example usage

```hcl
locals {
users = {
ed = {
email = "[email protected]",
admin = true,
}
edd = {
email = "[email protected]",
admin = true,
}
eddy = {
email = "[email protected]",
admin = false,
}
}
}

resource "codefresh_account_user_association" "users" {
for_each = local.users,
email = each.value.email,
admin = each.value.admin,
}
```

{{ .SchemaMarkdown | trimspace }}

## Import

An existing account user association can be imported via the user ID:

```sh
terraform import codefresh_account_user_association.test_user xxxxxxxxxxxxxxxxxxx
```

0 comments on commit d1beb61

Please sign in to comment.