Viewing docs for HashiCorp Cloud Platform (HCP) v0.1.14
published on Friday, Dec 2, 2022 by Grapl Security
published on Friday, Dec 2, 2022 by Grapl Security
HCP: Installation & Configuration
I want to use the Pulumi HashiCorp Cloud Platform (HCP) package (hcp) in my project.
## Provider details
- Package: hcp
- Version: v0.1.14
- Publisher: Grapl Security
- Source: pulumi
- Repository: https://github.com/grapl-security/pulumi-hcp
## Documentation
The Pulumi Cloud Registry API serves canonical, up-to-date docs for this package — including private packages and every published version. Send the "Accept: text/markdown" header for clean readable content, or "application/json" for structured data.
Start at the navigation tree, which cross-links to the readme, installation guide, and per-resource docs URL template:
- https://api.pulumi.com/api/registry/packages/pulumi/grapl_security/hcp/versions/latest/nav
Returns a summary by default. The full tree can be hundreds of kB for large providers, so prefer targeted search: append "?q=<query>&depth=full" to filter by resource/function title or token (for example "?q=bucket&depth=full"). Only request the full nav without a query if you actually need to enumerate every resource.
Other endpoints:
- Overview and getting started: https://api.pulumi.com/api/registry/packages/pulumi/grapl_security/hcp/versions/latest/readme
- Installation and configuration: https://api.pulumi.com/api/registry/packages/pulumi/grapl_security/hcp/versions/latest/installation
- Per-resource/function docs: https://api.pulumi.com/api/registry/packages/pulumi/grapl_security/hcp/versions/latest/docs/{token}?lang={lang}
Replace {token} with the percent-encoded token from the nav response (for example aws:s3/bucket:Bucket).
Replace {lang} with typescript, python, go, csharp, java, or yaml.
Fetch the installation endpoint above for the correct setup steps — install instructions vary between native providers, bridged Terraform providers, and component packages.
Help me get started using this provider. Show me a complete Pulumi program that provisions a common resource, including all necessary configuration and imports.
Viewing docs for HashiCorp Cloud Platform (HCP) v0.1.14
published on Friday, Dec 2, 2022 by Grapl Security
published on Friday, Dec 2, 2022 by Grapl Security
Installation
The Pulumi HCP provider is available as a package in the following Pulumi languages:
- JavaScript/TypeScript:
@grapl/pulumi-hcp - Python:
pulumi_hcp - Go:
github.com/graphl-security/pulumi-hcp/sdk
Setup
To provision resources with the Pulumi HCP provider, you need to have HCP credentials.
Set environment variables
Once you have provisioned these credentials, you can set environment variables to provision resources in HCP:
$ export HCP_CLIENT_ID=<HCP_CLIENT_ID>
$ export HCP_CLIENT_SECRET=<HCP_CLIENT_SECRET>
$ export HCP_CLIENT_ID=<HCP_CLIENT_ID>
$ export HCP_CLIENT_SECRET=<HCP_CLIENT_SECRET>
> $env:HCP_CLIENT_ID = "<HCP_CLIENT_ID>"
> $env:HCP_CLIENT_SECRET = "<HCP_CLIENT_SECRET>"
Configuration Options
Use pulumi config set hcp:<option> or pass options to the constructor of new hcp.Provider.
| Option | Required? | Description |
|---|---|---|
client_id | Required | The OAuth2 Client ID for API operations. Can be configured from the environment variable HCP_CLIENT_ID |
client_secret | Required | The OAuth2 Client Secret for API operations. Can be configured from the environment variable HCP_CLIENT_SECRET. |
Viewing docs for HashiCorp Cloud Platform (HCP) v0.1.14
published on Friday, Dec 2, 2022 by Grapl Security
published on Friday, Dec 2, 2022 by Grapl Security
