1. Packages
  2. Gcorelabs Provider
  3. API Docs
  4. K8sPool
gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core

gcorelabs.K8sPool

Explore with Pulumi AI

gcorelabs logo
gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core

    Represent k8s cluster’s pool.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const gcore_k8s_pool = new gcore.index.Gcore_k8s_pool("gcore_k8s_pool", {
        projectId: 1,
        regionId: 1,
        clusterId: "6bf878c1-1ce4-47c3-a39b-6b5f1d79bf25",
        name: "tf-pool",
        flavorId: "g1-standard-1-2",
        minNodeCount: 1,
        maxNodeCount: 2,
        nodeCount: 1,
        dockerVolumeSize: 2,
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    gcore_k8s_pool = gcore.index.Gcore_k8s_pool("gcore_k8s_pool",
        project_id=1,
        region_id=1,
        cluster_id=6bf878c1-1ce4-47c3-a39b-6b5f1d79bf25,
        name=tf-pool,
        flavor_id=g1-standard-1-2,
        min_node_count=1,
        max_node_count=2,
        node_count=1,
        docker_volume_size=2)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcore/sdk/go/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.NewGcore_k8s_pool(ctx, "gcore_k8s_pool", &gcore.Gcore_k8s_poolArgs{
    			ProjectId:        1,
    			RegionId:         1,
    			ClusterId:        "6bf878c1-1ce4-47c3-a39b-6b5f1d79bf25",
    			Name:             "tf-pool",
    			FlavorId:         "g1-standard-1-2",
    			MinNodeCount:     1,
    			MaxNodeCount:     2,
    			NodeCount:        1,
    			DockerVolumeSize: 2,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var gcore_k8s_pool = new Gcore.Index.Gcore_k8s_pool("gcore_k8s_pool", new()
        {
            ProjectId = 1,
            RegionId = 1,
            ClusterId = "6bf878c1-1ce4-47c3-a39b-6b5f1d79bf25",
            Name = "tf-pool",
            FlavorId = "g1-standard-1-2",
            MinNodeCount = 1,
            MaxNodeCount = 2,
            NodeCount = 1,
            DockerVolumeSize = 2,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.gcore_k8s_pool;
    import com.pulumi.gcore.Gcore_k8s_poolArgs;
    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) {
            var gcore_k8s_pool = new Gcore_k8s_pool("gcore_k8s_pool", Gcore_k8s_poolArgs.builder()
                .projectId(1)
                .regionId(1)
                .clusterId("6bf878c1-1ce4-47c3-a39b-6b5f1d79bf25")
                .name("tf-pool")
                .flavorId("g1-standard-1-2")
                .minNodeCount(1)
                .maxNodeCount(2)
                .nodeCount(1)
                .dockerVolumeSize(2)
                .build());
    
        }
    }
    
    resources:
      gcore_k8s_pool:
        type: gcore:gcore_k8s_pool
        properties:
          projectId: 1
          regionId: 1
          clusterId: 6bf878c1-1ce4-47c3-a39b-6b5f1d79bf25
          name: tf-pool
          flavorId: g1-standard-1-2
          minNodeCount: 1
          maxNodeCount: 2
          nodeCount: 1
          dockerVolumeSize: 2
    

    Create K8sPool Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new K8sPool(name: string, args: K8sPoolArgs, opts?: CustomResourceOptions);
    @overload
    def K8sPool(resource_name: str,
                args: K8sPoolInitArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def K8sPool(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                max_node_count: Optional[float] = None,
                cluster_id: Optional[str] = None,
                min_node_count: Optional[float] = None,
                flavor_id: Optional[str] = None,
                node_count: Optional[float] = None,
                k8s_pool_id: Optional[str] = None,
                docker_volume_size: Optional[float] = None,
                project_id: Optional[float] = None,
                last_updated: Optional[str] = None,
                name: Optional[str] = None,
                docker_volume_type: Optional[str] = None,
                project_name: Optional[str] = None,
                region_id: Optional[float] = None,
                region_name: Optional[str] = None,
                timeouts: Optional[K8sPoolTimeoutsArgs] = None)
    func NewK8sPool(ctx *Context, name string, args K8sPoolArgs, opts ...ResourceOption) (*K8sPool, error)
    public K8sPool(string name, K8sPoolArgs args, CustomResourceOptions? opts = null)
    public K8sPool(String name, K8sPoolArgs args)
    public K8sPool(String name, K8sPoolArgs args, CustomResourceOptions options)
    
    type: gcorelabs:K8sPool
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args K8sPoolArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args K8sPoolInitArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args K8sPoolArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args K8sPoolArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args K8sPoolArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var k8sPoolResource = new Gcorelabs.K8sPool("k8sPoolResource", new()
    {
        MaxNodeCount = 0,
        ClusterId = "string",
        MinNodeCount = 0,
        FlavorId = "string",
        NodeCount = 0,
        K8sPoolId = "string",
        DockerVolumeSize = 0,
        ProjectId = 0,
        LastUpdated = "string",
        Name = "string",
        DockerVolumeType = "string",
        ProjectName = "string",
        RegionId = 0,
        RegionName = "string",
        Timeouts = new Gcorelabs.Inputs.K8sPoolTimeoutsArgs
        {
            Create = "string",
            Update = "string",
        },
    });
    
    example, err := gcorelabs.NewK8sPool(ctx, "k8sPoolResource", &gcorelabs.K8sPoolArgs{
    	MaxNodeCount:     pulumi.Float64(0),
    	ClusterId:        pulumi.String("string"),
    	MinNodeCount:     pulumi.Float64(0),
    	FlavorId:         pulumi.String("string"),
    	NodeCount:        pulumi.Float64(0),
    	K8sPoolId:        pulumi.String("string"),
    	DockerVolumeSize: pulumi.Float64(0),
    	ProjectId:        pulumi.Float64(0),
    	LastUpdated:      pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	DockerVolumeType: pulumi.String("string"),
    	ProjectName:      pulumi.String("string"),
    	RegionId:         pulumi.Float64(0),
    	RegionName:       pulumi.String("string"),
    	Timeouts: &gcorelabs.K8sPoolTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var k8sPoolResource = new K8sPool("k8sPoolResource", K8sPoolArgs.builder()
        .maxNodeCount(0)
        .clusterId("string")
        .minNodeCount(0)
        .flavorId("string")
        .nodeCount(0)
        .k8sPoolId("string")
        .dockerVolumeSize(0)
        .projectId(0)
        .lastUpdated("string")
        .name("string")
        .dockerVolumeType("string")
        .projectName("string")
        .regionId(0)
        .regionName("string")
        .timeouts(K8sPoolTimeoutsArgs.builder()
            .create("string")
            .update("string")
            .build())
        .build());
    
    k8s_pool_resource = gcorelabs.K8sPool("k8sPoolResource",
        max_node_count=0,
        cluster_id="string",
        min_node_count=0,
        flavor_id="string",
        node_count=0,
        k8s_pool_id="string",
        docker_volume_size=0,
        project_id=0,
        last_updated="string",
        name="string",
        docker_volume_type="string",
        project_name="string",
        region_id=0,
        region_name="string",
        timeouts={
            "create": "string",
            "update": "string",
        })
    
    const k8sPoolResource = new gcorelabs.K8sPool("k8sPoolResource", {
        maxNodeCount: 0,
        clusterId: "string",
        minNodeCount: 0,
        flavorId: "string",
        nodeCount: 0,
        k8sPoolId: "string",
        dockerVolumeSize: 0,
        projectId: 0,
        lastUpdated: "string",
        name: "string",
        dockerVolumeType: "string",
        projectName: "string",
        regionId: 0,
        regionName: "string",
        timeouts: {
            create: "string",
            update: "string",
        },
    });
    
    type: gcorelabs:K8sPool
    properties:
        clusterId: string
        dockerVolumeSize: 0
        dockerVolumeType: string
        flavorId: string
        k8sPoolId: string
        lastUpdated: string
        maxNodeCount: 0
        minNodeCount: 0
        name: string
        nodeCount: 0
        projectId: 0
        projectName: string
        regionId: 0
        regionName: string
        timeouts:
            create: string
            update: string
    

    K8sPool Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The K8sPool resource accepts the following input properties:

    ClusterId string
    FlavorId string
    MaxNodeCount double
    MinNodeCount double
    NodeCount double
    DockerVolumeSize double
    DockerVolumeType string
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    K8sPoolId string
    The ID of this resource.
    LastUpdated string
    Name string
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    Timeouts K8sPoolTimeouts
    ClusterId string
    FlavorId string
    MaxNodeCount float64
    MinNodeCount float64
    NodeCount float64
    DockerVolumeSize float64
    DockerVolumeType string
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    K8sPoolId string
    The ID of this resource.
    LastUpdated string
    Name string
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    Timeouts K8sPoolTimeoutsArgs
    clusterId String
    flavorId String
    maxNodeCount Double
    minNodeCount Double
    nodeCount Double
    dockerVolumeSize Double
    dockerVolumeType String
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    k8sPoolId String
    The ID of this resource.
    lastUpdated String
    name String
    projectId Double
    projectName String
    regionId Double
    regionName String
    timeouts K8sPoolTimeouts
    clusterId string
    flavorId string
    maxNodeCount number
    minNodeCount number
    nodeCount number
    dockerVolumeSize number
    dockerVolumeType string
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    k8sPoolId string
    The ID of this resource.
    lastUpdated string
    name string
    projectId number
    projectName string
    regionId number
    regionName string
    timeouts K8sPoolTimeouts
    cluster_id str
    flavor_id str
    max_node_count float
    min_node_count float
    node_count float
    docker_volume_size float
    docker_volume_type str
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    k8s_pool_id str
    The ID of this resource.
    last_updated str
    name str
    project_id float
    project_name str
    region_id float
    region_name str
    timeouts K8sPoolTimeoutsArgs
    clusterId String
    flavorId String
    maxNodeCount Number
    minNodeCount Number
    nodeCount Number
    dockerVolumeSize Number
    dockerVolumeType String
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    k8sPoolId String
    The ID of this resource.
    lastUpdated String
    name String
    projectId Number
    projectName String
    regionId Number
    regionName String
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the K8sPool resource produces the following output properties:

    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    StackId string
    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    StackId string
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    stackId String
    createdAt string
    id string
    The provider-assigned unique ID for this managed resource.
    stackId string
    created_at str
    id str
    The provider-assigned unique ID for this managed resource.
    stack_id str
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    stackId String

    Look up Existing K8sPool Resource

    Get an existing K8sPool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: K8sPoolState, opts?: CustomResourceOptions): K8sPool
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            created_at: Optional[str] = None,
            docker_volume_size: Optional[float] = None,
            docker_volume_type: Optional[str] = None,
            flavor_id: Optional[str] = None,
            k8s_pool_id: Optional[str] = None,
            last_updated: Optional[str] = None,
            max_node_count: Optional[float] = None,
            min_node_count: Optional[float] = None,
            name: Optional[str] = None,
            node_count: Optional[float] = None,
            project_id: Optional[float] = None,
            project_name: Optional[str] = None,
            region_id: Optional[float] = None,
            region_name: Optional[str] = None,
            stack_id: Optional[str] = None,
            timeouts: Optional[K8sPoolTimeoutsArgs] = None) -> K8sPool
    func GetK8sPool(ctx *Context, name string, id IDInput, state *K8sPoolState, opts ...ResourceOption) (*K8sPool, error)
    public static K8sPool Get(string name, Input<string> id, K8sPoolState? state, CustomResourceOptions? opts = null)
    public static K8sPool get(String name, Output<String> id, K8sPoolState state, CustomResourceOptions options)
    resources:  _:    type: gcorelabs:K8sPool    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClusterId string
    CreatedAt string
    DockerVolumeSize double
    DockerVolumeType string
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    FlavorId string
    K8sPoolId string
    The ID of this resource.
    LastUpdated string
    MaxNodeCount double
    MinNodeCount double
    Name string
    NodeCount double
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    StackId string
    Timeouts K8sPoolTimeouts
    ClusterId string
    CreatedAt string
    DockerVolumeSize float64
    DockerVolumeType string
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    FlavorId string
    K8sPoolId string
    The ID of this resource.
    LastUpdated string
    MaxNodeCount float64
    MinNodeCount float64
    Name string
    NodeCount float64
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    StackId string
    Timeouts K8sPoolTimeoutsArgs
    clusterId String
    createdAt String
    dockerVolumeSize Double
    dockerVolumeType String
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    flavorId String
    k8sPoolId String
    The ID of this resource.
    lastUpdated String
    maxNodeCount Double
    minNodeCount Double
    name String
    nodeCount Double
    projectId Double
    projectName String
    regionId Double
    regionName String
    stackId String
    timeouts K8sPoolTimeouts
    clusterId string
    createdAt string
    dockerVolumeSize number
    dockerVolumeType string
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    flavorId string
    k8sPoolId string
    The ID of this resource.
    lastUpdated string
    maxNodeCount number
    minNodeCount number
    name string
    nodeCount number
    projectId number
    projectName string
    regionId number
    regionName string
    stackId string
    timeouts K8sPoolTimeouts
    cluster_id str
    created_at str
    docker_volume_size float
    docker_volume_type str
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    flavor_id str
    k8s_pool_id str
    The ID of this resource.
    last_updated str
    max_node_count float
    min_node_count float
    name str
    node_count float
    project_id float
    project_name str
    region_id float
    region_name str
    stack_id str
    timeouts K8sPoolTimeoutsArgs
    clusterId String
    createdAt String
    dockerVolumeSize Number
    dockerVolumeType String
    Available value is 'standard', 'ssd_hiiops', 'cold', 'ultra'.
    flavorId String
    k8sPoolId String
    The ID of this resource.
    lastUpdated String
    maxNodeCount Number
    minNodeCount Number
    name String
    nodeCount Number
    projectId Number
    projectName String
    regionId Number
    regionName String
    stackId String
    timeouts Property Map

    Supporting Types

    K8sPoolTimeouts, K8sPoolTimeoutsArgs

    Create string
    Update string
    Create string
    Update string
    create String
    update String
    create string
    update string
    create str
    update str
    create String
    update String

    Import

    import using <project_id>:<region_id>:<pool_id>:<cluster_id> format

    $ pulumi import gcorelabs:index/k8sPool:K8sPool k8s_pool1 1:6:a775dd94-4e9c-4da7-9f0e-ffc9ae34446b:447d2959-8ae0-4ca0-8d47-9f050a3637d7
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    gcorelabs g-core/terraform-provider-gcorelabs
    License
    Notes
    This Pulumi package is based on the gcorelabs Terraform Provider.
    gcorelabs logo
    gcorelabs 0.3.63 published on Monday, Apr 14, 2025 by g-core