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

Fix some workload identity examples #657

Merged
merged 3 commits into from
Oct 26, 2023
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/657.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
Fix some documentation mistakes in examples for the `hcp_iam_workload_identity_provider` resource.
```
6 changes: 3 additions & 3 deletions docs/resources/iam_workload_identity_provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ resource "hcp_iam_workload_identity_provider" "example" {
# The allowed audience should be set to the Object ID of the Azure Managed
# Identity. In this example, this would be the Object ID of a User Managed
# Identity that will be attached to "my-app" workloads on Azure.
allowed_audience = ["api://10bacc1d-f3f5-499d-a14c-684c1471b27f"]
allowed_audiences = ["api://10bacc1d-f3f5-499d-a14c-684c1471b27f"]
}

# Only allow workload's that are assigned the expected managed identity.
# The access_token given to Azure workload's will have the oid claim set to
# that of the managed identity.
conditional_access = "jwt_claims.oid is `066c643f-86c0-490a-854c-35e77ddc7851`"
conditional_access = "jwt_claims.oid == `066c643f-86c0-490a-854c-35e77ddc7851`"
}
```

Expand All @@ -77,7 +77,7 @@ resource "hcp_iam_workload_identity_provider" "example" {
# Only allow workload's that are assigned the expected service account ID
# GCP will set the subject to that of the service account associated with the
# workload.
conditional_access = "jwt_token.sub is `107517467455664443766`"
conditional_access = "jwt_claims.sub == `107517467455664443766`"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ resource "hcp_iam_workload_identity_provider" "example" {
# The allowed audience should be set to the Object ID of the Azure Managed
# Identity. In this example, this would be the Object ID of a User Managed
# Identity that will be attached to "my-app" workloads on Azure.
allowed_audience = ["api://10bacc1d-f3f5-499d-a14c-684c1471b27f"]
allowed_audiences = ["api://10bacc1d-f3f5-499d-a14c-684c1471b27f"]
}

# Only allow workload's that are assigned the expected managed identity.
# The access_token given to Azure workload's will have the oid claim set to
# that of the managed identity.
conditional_access = "jwt_claims.oid is `066c643f-86c0-490a-854c-35e77ddc7851`"
conditional_access = "jwt_claims.oid == `066c643f-86c0-490a-854c-35e77ddc7851`"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ resource "hcp_iam_workload_identity_provider" "example" {
# Only allow workload's that are assigned the expected service account ID
# GCP will set the subject to that of the service account associated with the
# workload.
conditional_access = "jwt_token.sub is `107517467455664443766`"
conditional_access = "jwt_claims.sub == `107517467455664443766`"
}