1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. container
  5. getAzureVersions
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.container.getAzureVersions

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    Provides access to available Kubernetes versions in a location for a given project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const central1b = gcp.container.getAzureVersions({
        location: "us-west1",
        project: "my-project",
    });
    export const firstAvailableVersion = versions.validVersions[0];
    
    import pulumi
    import pulumi_gcp as gcp
    
    central1b = gcp.container.get_azure_versions(location="us-west1",
        project="my-project")
    pulumi.export("firstAvailableVersion", versions["validVersions"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := container.GetAzureVersions(ctx, &container.GetAzureVersionsArgs{
    			Location: pulumi.StringRef("us-west1"),
    			Project:  pulumi.StringRef("my-project"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstAvailableVersion", versions.ValidVersions[0])
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var central1b = Gcp.Container.GetAzureVersions.Invoke(new()
        {
            Location = "us-west1",
            Project = "my-project",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstAvailableVersion"] = versions.ValidVersions[0],
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.container.ContainerFunctions;
    import com.pulumi.gcp.container.inputs.GetAzureVersionsArgs;
    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 central1b = ContainerFunctions.getAzureVersions(GetAzureVersionsArgs.builder()
                .location("us-west1")
                .project("my-project")
                .build());
    
            ctx.export("firstAvailableVersion", versions.validVersions()[0]);
        }
    }
    
    variables:
      central1b:
        fn::invoke:
          Function: gcp:container:getAzureVersions
          Arguments:
            location: us-west1
            project: my-project
    outputs:
      firstAvailableVersion: ${versions.validVersions[0]}
    

    Using getAzureVersions

    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 getAzureVersions(args: GetAzureVersionsArgs, opts?: InvokeOptions): Promise<GetAzureVersionsResult>
    function getAzureVersionsOutput(args: GetAzureVersionsOutputArgs, opts?: InvokeOptions): Output<GetAzureVersionsResult>
    def get_azure_versions(location: Optional[str] = None,
                           project: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetAzureVersionsResult
    def get_azure_versions_output(location: Optional[pulumi.Input[str]] = None,
                           project: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetAzureVersionsResult]
    func GetAzureVersions(ctx *Context, args *GetAzureVersionsArgs, opts ...InvokeOption) (*GetAzureVersionsResult, error)
    func GetAzureVersionsOutput(ctx *Context, args *GetAzureVersionsOutputArgs, opts ...InvokeOption) GetAzureVersionsResultOutput

    > Note: This function is named GetAzureVersions in the Go SDK.

    public static class GetAzureVersions 
    {
        public static Task<GetAzureVersionsResult> InvokeAsync(GetAzureVersionsArgs args, InvokeOptions? opts = null)
        public static Output<GetAzureVersionsResult> Invoke(GetAzureVersionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAzureVersionsResult> getAzureVersions(GetAzureVersionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:container/getAzureVersions:getAzureVersions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location to list versions for.
    Project string
    ID of the project to list available cluster versions for. Should match the project the cluster will be deployed to. Defaults to the project that the provider is authenticated with.
    Location string
    The location to list versions for.
    Project string
    ID of the project to list available cluster versions for. Should match the project the cluster will be deployed to. Defaults to the project that the provider is authenticated with.
    location String
    The location to list versions for.
    project String
    ID of the project to list available cluster versions for. Should match the project the cluster will be deployed to. Defaults to the project that the provider is authenticated with.
    location string
    The location to list versions for.
    project string
    ID of the project to list available cluster versions for. Should match the project the cluster will be deployed to. Defaults to the project that the provider is authenticated with.
    location str
    The location to list versions for.
    project str
    ID of the project to list available cluster versions for. Should match the project the cluster will be deployed to. Defaults to the project that the provider is authenticated with.
    location String
    The location to list versions for.
    project String
    ID of the project to list available cluster versions for. Should match the project the cluster will be deployed to. Defaults to the project that the provider is authenticated with.

    getAzureVersions Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    SupportedRegions List<string>
    A list of Azure regions that are available for use with this project and GCP location.
    ValidVersions List<string>
    A list of versions available for use with this project and location.
    Location string
    Project string
    Id string
    The provider-assigned unique ID for this managed resource.
    SupportedRegions []string
    A list of Azure regions that are available for use with this project and GCP location.
    ValidVersions []string
    A list of versions available for use with this project and location.
    Location string
    Project string
    id String
    The provider-assigned unique ID for this managed resource.
    supportedRegions List<String>
    A list of Azure regions that are available for use with this project and GCP location.
    validVersions List<String>
    A list of versions available for use with this project and location.
    location String
    project String
    id string
    The provider-assigned unique ID for this managed resource.
    supportedRegions string[]
    A list of Azure regions that are available for use with this project and GCP location.
    validVersions string[]
    A list of versions available for use with this project and location.
    location string
    project string
    id str
    The provider-assigned unique ID for this managed resource.
    supported_regions Sequence[str]
    A list of Azure regions that are available for use with this project and GCP location.
    valid_versions Sequence[str]
    A list of versions available for use with this project and location.
    location str
    project str
    id String
    The provider-assigned unique ID for this managed resource.
    supportedRegions List<String>
    A list of Azure regions that are available for use with this project and GCP location.
    validVersions List<String>
    A list of versions available for use with this project and location.
    location String
    project String

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi