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
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
The HashiCorp Cloud Platform provider (HCP) for Pulumi can be used to provision any of the cloud resources available in HashiCorp Cloud Platform. The HCP provider must be configured with credentials to deploy and update resources.
Example
import * as pulumi from "@pulumi/pulumi";
import * as hcp from "@grapl/pulumi-hcp";
const hvn = new hcp.Hvn(
"my-hvn",
{
hvnId: "my-hvn",
cloudProvider: "aws",
region: "us-east-1"
}
);
new hcp.VaultCluster(
"my-vault-cluster",
{
hvnId: hvn.hvnId,
clusterId: "my-vault-cluster",
tier: "dev"
}
);
import pulumi
import pulumi_hcp as hcp
def main() -> None:
hvn = hcp.Hvn(
"my-hvn",
hvn_id="my-hvn",
cloud_provider="aws",
region="us-east-1",
)
hcp.VaultCluster(
"my-vault-cluster",
hvn_id=hvn.hvn_id,
cluster_id="my-vault-cluster",
tier="dev",
)
if __name__ == "__main__":
main()
package main
import (
"fmt"
hcp "github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
hvn, err := hcp.NewHvn(ctx, "my-hvn", &hcp.HvnArgs{
HvnId: pulumi.String("my-hvn"),
CloudProvider: pulumi.String("aws"),
Region: pulumi.String("us-east-1"),
})
if err != nil {
return fmt.Errorf("error creating HVN: %v", err)
}
_, err = hcp.NewVaultCluster(ctx, "my-vault-cluster", &hcp.VaultClusterArgs{
HvnId: hvn.HvnId,
ClusterId: pulumi.String("my-vault-cluster"),
Tier: pulumi.String("dev"),
})
if err != nil {
return fmt.Errorf("error creating Vault cluster: %v", err)
}
return nil
})
}
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
