Skip to content

Commit

Permalink
Merge pull request #13 from mineiros-io/soerenmartius/fix-docs
Browse files Browse the repository at this point in the history
Fix docs
  • Loading branch information
soerenmartius authored Mar 11, 2022
2 parents d367a2d + 609e2fb commit cf8200d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 40 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## Fixed

- Correct docs for memberships

### Added

- Add unit tests
Expand Down
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,25 +146,16 @@ See [variables.tf] and [examples/] for details and use-cases.

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

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

The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name.
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 the `MEMBER` role to be assigned.

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

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

The name of the MembershipRole. Must be one of `OWNER`, `MANAGER, `MEMBER`. Possible values are `OWNER`, `MANAGER`, and `MEMBER`.

- [**`preferred_member_key `**](#attr-memberships-preferred_member_key ): *(Optional `object(preferred_member_key)`)*<a name="attr-memberships-preferred_member_key "></a>

EntityKey of the member.

The `preferred_member_key` object accepts the following attributes:

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

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. Must be unique within a namespace.
```hcl
roles = ["MEMBER", "MANAGER"]
```
- [**`membership_timeouts`**](#attr-memberships-membership_timeouts): *(Optional `object(group_timeout)`)*<a name="attr-memberships-membership_timeouts"></a>
Expand Down
30 changes: 6 additions & 24 deletions README.tfdoc.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -193,33 +193,15 @@ section {

attribute "roles" {
required = true
type = list(role)
type = list(string)
description = <<-END
The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name.
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 the `MEMBER` role to be assigned.
END

attribute "name" {
required = true
type = string
description = <<-END
The name of the MembershipRole. Must be one of `OWNER`, `MANAGER, `MEMBER`. Possible values are `OWNER`, `MANAGER`, and `MEMBER`.
END
}
}

attribute "preferred_member_key " {
type = object(preferred_member_key)
description = <<-END
EntityKey of the member.
END

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. Must be unique within a namespace.
END
}
readme_example = <<-END
roles = ["MEMBER", "MANAGER"]
END
}

attribute "membership_timeouts" {
Expand Down

0 comments on commit cf8200d

Please sign in to comment.