Guides
Pulumi
Use the Grantex Terraform provider with Pulumi via the Terraform bridge.
Last modified on August 29, 2026
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use the Grantex Terraform provider with Pulumi via the Terraform bridge.
pulumi plugin install resource grantex v0.1.0 --server github://api.github.com/mishrasanjeev/terraform-provider-grantex
pulumi config set grantex:apiKey --secret gx_live_...
pulumi config set grantex:baseUrl https://api.grantex.dev
import * as pulumi from "@pulumi/pulumi";
import * as grantex from "@pulumi/grantex";
const agent = new grantex.Agent("calendar-bot", {
name: "Calendar Assistant",
description: "Manages calendar events",
scopes: ["read:calendar", "write:calendar"],
});
const policy = new grantex.Policy("business-hours", {
name: "Business Hours Only",
effect: "deny",
agentId: agent.agentId,
timeOfDayStart: "18:00",
timeOfDayEnd: "08:00",
});
const webhook = new grantex.Webhook("alerts", {
url: "https://hooks.slack.com/services/T00/B00/xxx",
events: ["grant.created", "grant.revoked"],
});
export const agentDid = agent.did;
import pulumi
import pulumi_grantex as grantex
agent = grantex.Agent("calendar-bot",
name="Calendar Assistant",
description="Manages calendar events",
scopes=["read:calendar", "write:calendar"],
)
policy = grantex.Policy("business-hours",
name="Business Hours Only",
effect="deny",
agent_id=agent.agent_id,
time_of_day_start="18:00",
time_of_day_end="08:00",
)
pulumi.export("agent_did", agent.did)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi-grantex/sdk/go/grantex"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
agent, err := grantex.NewAgent(ctx, "calendar-bot", &grantex.AgentArgs{
Name: pulumi.String("Calendar Assistant"),
Scopes: pulumi.StringArray{pulumi.String("read:calendar")},
})
if err != nil {
return err
}
ctx.Export("agentDid", agent.Did)
return nil
})
}
git clone https://github.com/pulumi/pulumi-tf-provider-boilerplate
cd pulumi-tf-provider-boilerplate
# Update provider/resources.go to point to grantex
# Build the provider
make build