Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update iam_policy.md #801

Merged
merged 9 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/801.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
Documentation: Update hcp_iam_policy docs with HCP Vault Secrets Roles App Manager and App Secret Reader
```
9 changes: 7 additions & 2 deletions docs/data-sources/iam_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ description: |-
Generates an IAM policy that may be referenced by and applied to other HCP IAM resources, such as the `hcp_project_iam_policy` resource.

To see what each role grants, please see [HCP
Documentation](https://developer.hashicorp.com/hcp/docs/hcp/admin/iam/users#organization-role).
Documentation](https://developer.hashicorp.com/hcp/docs/hcp/admin/iam/users#organization).
The basic roles can be referenced as follows:

* `roles/owner`
* `roles/admin`
* `roles/contributor`
* `roles/viewer`

HCP Vault Secrets specific roles can be referenced as shown below, please see [Documentation](https://developer.hashicorp.com/hcp/docs/hcp/admin/iam/users#project) for more details.
* `roles/secrets.app-manager`
* `roles/secrets.app-secret-reader`


## Example Usage

```terraform
Expand All @@ -39,7 +44,7 @@ data "hcp_iam_policy" "example" {
]
},
{
role = "roles/viewer"
role = "roles/secrets.app-secret-reader"
principals = [
"example-sp-3"
]
Expand Down
2 changes: 1 addition & 1 deletion examples/data-sources/hcp_iam_policy/data-source.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ data "hcp_iam_policy" "example" {
]
},
{
role = "roles/viewer"
role = "roles/secrets.app-secret-reader"
principals = [
"example-sp-3"
]
Expand Down
7 changes: 6 additions & 1 deletion templates/data-sources/iam_policy.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ description: |-
{{ .Description | trimspace }}

To see what each role grants, please see [HCP
Documentation](https://developer.hashicorp.com/hcp/docs/hcp/admin/iam/users#organization-role).
Documentation](https://developer.hashicorp.com/hcp/docs/hcp/admin/iam/users#organization).
The basic roles can be referenced as follows:

* `roles/owner`
* `roles/admin`
* `roles/contributor`
* `roles/viewer`

HCP Vault Secrets specific roles can be referenced as shown below, please see [Documentation](https://developer.hashicorp.com/hcp/docs/hcp/admin/iam/users#project) for more details.
* `roles/secrets.app-manager`
* `roles/secrets.app-secret-reader`


## Example Usage

{{ tffile "examples/data-sources/hcp_iam_policy/data-source.tf" }}
Expand Down