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

Documentation - There seems to be a mistake in the example code for the hcp_iam_workload_identity_provider resource. #1114

Open
itot555 opened this issue Oct 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@itot555
Copy link

itot555 commented Oct 10, 2024

Terraform Version and Provider Version

Terraform version: 1.9.7
HCP provider version: 0.97.0

Affected Resource(s)

  • hcp_iam_workload_identity_provider

Terraform Configuration Files

resource "hcp_iam_workload_identity_provider" "example" {
  name              = "github-example"
  service_principal = hcp_service_principal.deployment_sp.resource_name
  description       = "Allow acme-repo deploy workflow to access my-app-runtime service principal"

  oidc {
    issuer_uri = "https://token.actions.githubusercontent.com"
  }

  conditional_access = "<CONDITION>"
}

Debug Output

Panic Output

Steps to Reproduce

  1. terraform apply with example code in hcp_iam_workload_identity_provider.

  2. Error output like the following.

  oidc {
Blocks of type "oidc" are not expected here. Did you mean to define argument "oidc"? If so, use the equals sign to assign it a value.

Expected Behavior

The oidc block was defined as an argument and set to a value with = like the following and terraform apply ran successfully.

  oidc = {
    issuer_uri = "https://token.actions.githubusercontent.com"
  }

Actual Behavior

Important Factoids

References

  • #0000

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@itot555 itot555 added the bug Something isn't working label Oct 10, 2024
@jmeisele
Copy link

Ran into this as well and made PR to fix the documentation

#1115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants