Upon request from our community, we have developed Pulumi Provider for Upstash Redis and Kafka, which is now publicly available.
Pulumi is an automated provisioning tool similar to Terraform but it leverages the functionalities of modern programming languages such as TypeScript, Go and Python. This way, you can create conditional resources, multiple resources via loops and so on, enabling for more dynamic and maintainable IAC.
Creating your infrastructure as code with your favorite languages
Create pulumi template
pulumi new <your_language>
TypeScript / JavaScript
const createdDb = new upstash.RedisDatabase("mydb", {
databaseName: "pulumi-ts-db",
region: "eu-west-1",
tls: true,
});
Go
createdCluster, _ := upstash.NewKafkaCluster(ctx, "exampleCluster", &upstash.KafkaClusterArgs{
ClusterName: pulumi.String("pulumi-go-cluster"),
Multizone: pulumi.Bool(false),
Region: pulumi.String("eu-west-1"),
})
Python
created_team = upstash.Team(
resource_name="myTeam",
team_name="pulumi team",
copy_cc=True,
team_members={
"<owner_email>": "owner",
"<second_email>": "admin"
}
)
CRUD your resources: pulumi up
Future Work
We want to keep the developer experience easy and intuitive. Hence, we will keep our tools up-to-date with our services. As an example, QStash resources will soon be added to both Terraform and Pulumi providers.
Closing Words
For resource creations with different languages, you can have a look at our repo.
You can share your feedback via Twitter or Discord, which will be greatly appreciated.