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

hashicorp/hcp 0.102.0: Warning during Apply #3825

Open
1 task
ter24 opened this issue Feb 14, 2025 · 0 comments
Open
1 task

hashicorp/hcp 0.102.0: Warning during Apply #3825

ter24 opened this issue Feb 14, 2025 · 0 comments
Labels
bug Something isn't working new Un-triaged issue pre-built providers Issues around pre-built providers managed at https://github.com/hashicorp/cdktf-repository-manager

Comments

@ter24
Copy link

ter24 commented Feb 14, 2025

Expected Behavior

  • I add "hashicorp/hcp@~>0.0" to my cdktf.json.
  • I execute cdktf get which places it in a local imports directory.
  • I used the library via from imports.hcp.provider import HcpProvider and HcpProvider(self, "HcpProvider")
  • It works without warnings or error when running cdktf apply

Actual Behavior

  • Recently (perhaps w/the 0.102.0 release) when I run my cdktf apply I get:
Warning: You may experience issues using HCP.
            │ 
            │   with provider["registry.terraform.io/hashicorp/hcp"],
            │   on cdk.tf.json line 89, in provider.hcp[0]:
            │   89:       }
            │ 
            │ Unable unmarshal response to verify HCP status: invalid character '<' looking
            │ for beginning of value
            │ 
            │ (and one more similar warning elsewhere)
  • Aside from the warning, things appear to work properly. (I use the HCP provider for access to Vault).
  • Note that the warning appears to come from this in my cdktf.out/stacks/<stack-name>/cdk.tf.json:
  "provider": {
    "hcp": [
      {
      }
    ],
  • Unsure if this makes a difference, but I'm using Python with my CDKTF.
  • Let me know if there is any additional information needed.

Steps to Reproduce

  1. Import and call the HcpProvider class in a stack.
  2. See if the Warning message occurs.

Versions

language: python
cdktf-cli: 0.20.11
node: v22.13.1
cdktf: 0.20.11
constructs: 10.4.2
jsii: 1.106.0
terraform: 1.10.5
arch: arm64
os: darwin 24.1.0
python: Python 3.13.1
pip: null
pipenv: pipenv, version 2024.4.1
providers
azurerm@> 4.0 (LOCAL)
terraform provider version: 4.18.0
hcp@
>0.0 (LOCAL)
terraform provider version: 0.102.0
kubernetes@> 2.0 (LOCAL)
terraform provider version: 2.35.1
random@
> 3.0 (LOCAL)
terraform provider version: 3.6.3
kreuzwerker/docker@~> 3.0 (LOCAL)
terraform provider version: undefined

Providers

┌────────────────────┬──────────────────┬───────┬────────────┬──────────────┬─────────────────┐
│ Provider Name │ Provider Version │ CDKTF │ Constraint │ Package Name │ Package Version │
├────────────────────┼──────────────────┼───────┼────────────┼──────────────┼─────────────────┤
│ azurerm │ 4.18.0 │ │ ~> 4.0 │ │ │
├────────────────────┼──────────────────┼───────┼────────────┼──────────────┼─────────────────┤
│ hcp │ 0.102.0 │ │ ~>0.0 │ │ │
├────────────────────┼──────────────────┼───────┼────────────┼──────────────┼─────────────────┤
│ kubernetes │ 2.35.1 │ │ ~> 2.0 │ │ │
├────────────────────┼──────────────────┼───────┼────────────┼──────────────┼─────────────────┤
│ random │ 3.6.3 │ │ ~> 3.0 │ │ │
├────────────────────┼──────────────────┼───────┼────────────┼──────────────┼─────────────────┤
│ kreuzwerker/docker │ │ │ ~> 3.0 │ │ │
└────────────────────┴──────────────────┴───────┴────────────┴──────────────┴─────────────────┘

Gist

No response

Possible Solutions

I don't know enough about CDKTF to help much here. My guess would be it is unable to parse the JSON because it has no arguments passed and is empty.

Workarounds

Ignore the warning.

Anything Else?

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@ter24 ter24 added bug Something isn't working new Un-triaged issue pre-built providers Issues around pre-built providers managed at https://github.com/hashicorp/cdktf-repository-manager labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new Un-triaged issue pre-built providers Issues around pre-built providers managed at https://github.com/hashicorp/cdktf-repository-manager
Projects
None yet
Development

No branches or pull requests

1 participant