1. Packages
  2. Scaleway
  3. API Docs
  4. observability
  5. getPlan
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.observability.getPlan

Explore with Pulumi AI

Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

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)});
Copy
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)
Copy
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
	})
}
Copy
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),
    });

});
Copy
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());

    }
}
Copy
resources:
  main:
    type: scaleway:observability:Cockpit
    properties:
      plan: ${premium.id}
variables:
  premium:
    fn::invoke:
      function: scaleway:observability:getPlan
      arguments:
        name: premium
Copy

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>
Copy
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]
Copy
func GetPlan(ctx *Context, args *GetPlanArgs, opts ...InvokeOption) (*GetPlanResult, error)
func GetPlanOutput(ctx *Context, args *GetPlanOutputArgs, opts ...InvokeOption) GetPlanResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetPlanResult> getPlan(GetPlanArgs args, InvokeOptions options)
public static Output<GetPlanResult> getPlan(GetPlanArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:observability/getPlan:getPlan
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the pricing plan you want to retrieve information about.
Name This property is required. string
Name of the pricing plan you want to retrieve information about.
name This property is required. String
Name of the pricing plan you want to retrieve information about.
name This property is required. string
Name of the pricing plan you want to retrieve information about.
name This property is required. str
Name of the pricing plan you want to retrieve information about.
name This property is required. String
Name of the pricing plan you want to retrieve information about.

getPlan Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Name string
Id string
The provider-assigned unique ID for this managed resource.
Name string
id String
The provider-assigned unique ID for this managed resource.
name String
id string
The provider-assigned unique ID for this managed resource.
name string
id str
The provider-assigned unique ID for this managed resource.
name str
id String
The provider-assigned unique ID for this managed resource.
name String

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse