scaleway.observability.getPlan
Explore with Pulumi AI
The scaleway.observability.getPlan data source is used to fetch details about a specific Scaleway Cockpit pricing plan. This information can then be used to configure resources like scaleway.observability.Cockpit.
Find out more about pricing plans in the Scaleway console.
Refer to Cockpit’s product documentation and API documentation for more information.
Fetch and associate a pricing plan to a Cockpit
The following command shows how to fetch information about the premium pricing plan and how to associate it with the Cockpit of your Scaleway default Project.
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";
const premium = scaleway.observability.getPlan({
name: "premium",
});
const main = new scaleway.observability.Cockpit("main", {plan: premium.then(premium => premium.id)});
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway
premium = scaleway.observability.get_plan(name="premium")
main = scaleway.observability.Cockpit("main", plan=premium.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/observability"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
premium, err := observability.GetPlan(ctx, &observability.GetPlanArgs{
Name: "premium",
}, nil)
if err != nil {
return err
}
_, err = observability.NewCockpit(ctx, "main", &observability.CockpitArgs{
Plan: pulumi.String(premium.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var premium = Scaleway.Observability.GetPlan.Invoke(new()
{
Name = "premium",
});
var main = new Scaleway.Observability.Cockpit("main", new()
{
Plan = premium.Apply(getPlanResult => getPlanResult.Id),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.observability.ObservabilityFunctions;
import com.pulumi.scaleway.observability.inputs.GetPlanArgs;
import com.pulumi.scaleway.observability.Cockpit;
import com.pulumi.scaleway.observability.CockpitArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var premium = ObservabilityFunctions.getPlan(GetPlanArgs.builder()
.name("premium")
.build());
var main = new Cockpit("main", CockpitArgs.builder()
.plan(premium.applyValue(getPlanResult -> getPlanResult.id()))
.build());
}
}
resources:
main:
type: scaleway:observability:Cockpit
properties:
plan: ${premium.id}
variables:
premium:
fn::invoke:
function: scaleway:observability:getPlan
arguments:
name: premium
Using getPlan
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPlan(args: GetPlanArgs, opts?: InvokeOptions): Promise<GetPlanResult>
function getPlanOutput(args: GetPlanOutputArgs, opts?: InvokeOptions): Output<GetPlanResult>def get_plan(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPlanResult
def get_plan_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPlanResult]func GetPlan(ctx *Context, args *GetPlanArgs, opts ...InvokeOption) (*GetPlanResult, error)
func GetPlanOutput(ctx *Context, args *GetPlanOutputArgs, opts ...InvokeOption) GetPlanResultOutput> Note: This function is named GetPlan in the Go SDK.
public static class GetPlan
{
public static Task<GetPlanResult> InvokeAsync(GetPlanArgs args, InvokeOptions? opts = null)
public static Output<GetPlanResult> Invoke(GetPlanInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPlanResult> getPlan(GetPlanArgs args, InvokeOptions options)
public static Output<GetPlanResult> getPlan(GetPlanArgs args, InvokeOptions options)
fn::invoke:
function: scaleway:observability/getPlan:getPlan
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- Name of the pricing plan you want to retrieve information about.
- Name string
- Name of the pricing plan you want to retrieve information about.
- name String
- Name of the pricing plan you want to retrieve information about.
- name string
- Name of the pricing plan you want to retrieve information about.
- name str
- Name of the pricing plan you want to retrieve information about.
- name String
- Name of the pricing plan you want to retrieve information about.
getPlan Result
The following output properties are available:
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scalewayTerraform Provider.