Skip to content

Commit

Permalink
Merge pull request #21 from mineiros-io/soerenmartius/fix-readme
Browse files Browse the repository at this point in the history
Add missing id attribute to memberships documentation
  • Loading branch information
mariux authored Jan 2, 2023
2 parents 9a6e188 + 3815482 commit f661348
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 13 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,32 @@ See [variables.tf] and [examples/] for details and use-cases.

Default is `[]`.

Example:

```hcl
memberships = [
{
id = "[email protected]"
roles = ["MEMBER", "MANAGER"]
}
]
```

Each `membership` object in the list accepts the following attributes:

- [**`id`**](#attr-memberships-id): *(**Required** `string`)*<a name="attr-memberships-id"></a>

The id of the entity. For Google-managed entities, the id must be
the email address of an existing group or user. For external-identity-mapped
entities, the id must be a string conforming to the identity source's requirements.

- [**`roles`**](#attr-memberships-roles): *(Optional `list(string)`)*<a name="attr-memberships-roles"></a>

A list of roles to bind to this Membership. Possible values are `OWNER`, `MANAGER`, and `MEMBER`.
**Note:** The `OWNER` and `MANAGER` roles are supplementary roles that require the `MEMBER` role to be assigned.

Default is `["MEMBER"]`.

Example:

```hcl
roles = ["MEMBER", "MANAGER"]
```
### Module Configuration

- [**`module_enabled`**](#var-module_enabled): *(Optional `bool`)*<a name="var-module_enabled"></a>
Expand Down
28 changes: 21 additions & 7 deletions README.tfdoc.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,29 @@ section {
}

variable "memberships" {
type = list(membership)
description = <<-END
type = list(membership)
description = <<-END
A list of memberships (id, roles) to get attached to the group resource created.
END
default = []
readme_example = <<-END
memberships = [
{
id = "[email protected]"
roles = ["MEMBER", "MANAGER"]
}
]
END
default = []

attribute "id" {
required = true
type = string
description = <<-END
The id of the entity. For Google-managed entities, the id must be
the email address of an existing group or user. For external-identity-mapped
entities, the id must be a string conforming to the identity source's requirements.
END
}

attribute "roles" {
type = list(string)
Expand All @@ -173,10 +191,6 @@ section {
A list of roles to bind to this Membership. Possible values are `OWNER`, `MANAGER`, and `MEMBER`.
**Note:** The `OWNER` and `MANAGER` roles are supplementary roles that require the `MEMBER` role to be assigned.
END

readme_example = <<-END
roles = ["MEMBER", "MANAGER"]
END
}
}
}
Expand Down

0 comments on commit f661348

Please sign in to comment.