Viewing docs for Koyeb v0.1.11
published on Monday, Dec 9, 2024 by Koyeb
published on Monday, Dec 9, 2024 by Koyeb
Koyeb
I want to use the Pulumi Koyeb package (koyeb) in my project.
## Provider details
- Package: koyeb
- Version: v0.1.11
- Publisher: Koyeb
- Source: pulumi
- Repository: https://github.com/koyeb/pulumi-koyeb
## 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/koyeb/koyeb/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/koyeb/koyeb/versions/latest/readme
- Installation and configuration: https://api.pulumi.com/api/registry/packages/pulumi/koyeb/koyeb/versions/latest/installation
- Per-resource/function docs: https://api.pulumi.com/api/registry/packages/pulumi/koyeb/koyeb/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 Koyeb v0.1.11
published on Monday, Dec 9, 2024 by Koyeb
published on Monday, Dec 9, 2024 by Koyeb
The Koyeb provider for Pulumi can be used to provision any of the cloud resources available in Koyeb.
To be able to manage Koyeb resources using Pulumi, you first need a Koyeb API access token to allow Pulumi to authenticate to Koyeb. Koyeb API access token credentials can be obtained from the Koyeb Control Panel.
Example
import * as koyeb from "@koyeb/pulumi-koyeb";
const koyebApp = new koyeb.App("sample-app", {
name: "sample-app",
});
const koyebService = new koyeb.Service("sample-service", {
appName: koyebApp.name,
definition: {
name: "sample-service",
regions: ["fra"],
git: {
repository: "github.com/koyeb/example-golang",
branch: "main",
},
instanceTypes: {
type: "micro",
},
routes: [
{
path: "/",
port: 8080,
},
],
ports: [
{
port: 8080,
protocol: "http",
},
],
scalings: {
min: 1,
max: 1,
},
},
});
import (
"github.com/koyeb/pulumi-koyeb/sdk/go/koyeb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
app, err := koyeb.App(ctx, "sample-app", &koyeb.AppArgs{
Name: pulumi.String("sample-app"),
})
if err != nil {
return err
}
_, err = koyeb.NewKoyebService(ctx, "sample-service", &koyeb.ServiceArgs{
AppName: app.Name,
Definition: &koyeb.ServiceDefinitionArgs{
Name: pulumi.String("sample-service"),
Regions: pulumi.StringArray{
pulumi.String("fra"),
},
Git: &koyeb.ServiceDefinitionGitArgs{
Repository: pulumi.String("github.com/koyeb/example-golang"),
Branch: pulumi.String("main"),
},
InstanceTypes: &koyeb.ServiceDefinitionInstanceTypesArgs{
Type: pulumi.String("micro"),
},
Routes: koyeb.ServiceDefinitionRouteArray{
&koyeb.ServiceDefinitionRouteArgs{
Path: pulumi.String("/"),
Port: pulumi.Int(8080),
},
},
Ports: koyeb.ServiceDefinitionPortArray{
&koyeb.ServiceDefinitionPortArgs{
Port: pulumi.Int(8080),
Protocol: pulumi.String("http"),
},
},
Scalings: &koyeb.ServiceDefinitionScalingsArgs{
Min: pulumi.Int(1),
Max: pulumi.Int(1),
},
},
})
if err != nil {
return err
}
return nil
})
}
import pulumi_koyeb as koyeb
app = koyeb.App("sample-app", name="sample-app")
koyeb.Service("sample-service", app_name=app.name, definition=koyeb.ServiceDefinitionArgs(
name="sample-service",
regions=["fra"],
git=koyeb.ServiceDefinitionGitArgs(
repository="github.com/koyeb/example-golang",
branch="main",
),
instance_types=koyeb.ServiceDefinitionInstanceTypesArgs(
type="micro",
),
routes=[koyeb.ServiceDefinitionRouteArgs(
path="/",
port=8080,
)],
ports=[koyeb.ServiceDefinitionPortArgs(
port=8080,
protocol="http",
)],
scalings=koyeb.ServiceDefinitionScalingsArgs(
min=1,
max=1,
),
))
Viewing docs for Koyeb v0.1.11
published on Monday, Dec 9, 2024 by Koyeb
published on Monday, Dec 9, 2024 by Koyeb
