1. Packages
  2. Castai Provider
  3. API Docs
  4. getEksSettings
castai 7.44.0 published on Friday, Mar 21, 2025 by castai

castai.getEksSettings

Explore with Pulumi AI

castai logo
castai 7.44.0 published on Friday, Mar 21, 2025 by castai

    Retrieve IAM policy, IAM User Policy and instance profile policies for the specified cluster

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as castai from "@pulumi/castai";
    
    const current = castai.getEksSettings({
        accountId: data.aws_caller_identity.current.account_id,
        region: _var.cluster_region,
        cluster: _var.cluster_name,
        vpc: _var.vpc,
    });
    
    import pulumi
    import pulumi_castai as castai
    
    current = castai.get_eks_settings(account_id=data["aws_caller_identity"]["current"]["account_id"],
        region=var["cluster_region"],
        cluster=var["cluster_name"],
        vpc=var["vpc"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/castai/v7/castai"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := castai.GetEksSettings(ctx, &castai.GetEksSettingsArgs{
    			AccountId: data.Aws_caller_identity.Current.Account_id,
    			Region:    _var.Cluster_region,
    			Cluster:   _var.Cluster_name,
    			Vpc:       _var.Vpc,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Castai = Pulumi.Castai;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Castai.GetEksSettings.Invoke(new()
        {
            AccountId = data.Aws_caller_identity.Current.Account_id,
            Region = @var.Cluster_region,
            Cluster = @var.Cluster_name,
            Vpc = @var.Vpc,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.castai.CastaiFunctions;
    import com.pulumi.castai.inputs.GetEksSettingsArgs;
    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 current = CastaiFunctions.getEksSettings(GetEksSettingsArgs.builder()
                .accountId(data.aws_caller_identity().current().account_id())
                .region(var_.cluster_region())
                .cluster(var_.cluster_name())
                .vpc(var_.vpc())
                .build());
    
        }
    }
    
    variables:
      current:
        fn::invoke:
          function: castai:getEksSettings
          arguments:
            accountId: ${data.aws_caller_identity.current.account_id}
            region: ${var.cluster_region}
            cluster: ${var.cluster_name}
            vpc: ${var.vpc}
    

    Using getEksSettings

    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 getEksSettings(args: GetEksSettingsArgs, opts?: InvokeOptions): Promise<GetEksSettingsResult>
    function getEksSettingsOutput(args: GetEksSettingsOutputArgs, opts?: InvokeOptions): Output<GetEksSettingsResult>
    def get_eks_settings(account_id: Optional[str] = None,
                         cluster: Optional[str] = None,
                         id: Optional[str] = None,
                         region: Optional[str] = None,
                         vpc: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetEksSettingsResult
    def get_eks_settings_output(account_id: Optional[pulumi.Input[str]] = None,
                         cluster: Optional[pulumi.Input[str]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         region: Optional[pulumi.Input[str]] = None,
                         vpc: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetEksSettingsResult]
    func GetEksSettings(ctx *Context, args *GetEksSettingsArgs, opts ...InvokeOption) (*GetEksSettingsResult, error)
    func GetEksSettingsOutput(ctx *Context, args *GetEksSettingsOutputArgs, opts ...InvokeOption) GetEksSettingsResultOutput

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

    public static class GetEksSettings 
    {
        public static Task<GetEksSettingsResult> InvokeAsync(GetEksSettingsArgs args, InvokeOptions? opts = null)
        public static Output<GetEksSettingsResult> Invoke(GetEksSettingsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEksSettingsResult> getEksSettings(GetEksSettingsArgs args, InvokeOptions options)
    public static Output<GetEksSettingsResult> getEksSettings(GetEksSettingsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: castai:index/getEksSettings:getEksSettings
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Cluster string
    Region string
    Vpc string
    Id string
    The ID of this resource.
    AccountId string
    Cluster string
    Region string
    Vpc string
    Id string
    The ID of this resource.
    accountId String
    cluster String
    region String
    vpc String
    id String
    The ID of this resource.
    accountId string
    cluster string
    region string
    vpc string
    id string
    The ID of this resource.
    account_id str
    cluster str
    region str
    vpc str
    id str
    The ID of this resource.
    accountId String
    cluster String
    region String
    vpc String
    id String
    The ID of this resource.

    getEksSettings Result

    The following output properties are available:

    AccountId string
    Cluster string
    IamManagedPolicies List<string>
    IamPolicyJson string
    IamUserPolicyJson string
    Id string
    The ID of this resource.
    Region string
    Vpc string
    AccountId string
    Cluster string
    IamManagedPolicies []string
    IamPolicyJson string
    IamUserPolicyJson string
    Id string
    The ID of this resource.
    Region string
    Vpc string
    accountId String
    cluster String
    iamManagedPolicies List<String>
    iamPolicyJson String
    iamUserPolicyJson String
    id String
    The ID of this resource.
    region String
    vpc String
    accountId string
    cluster string
    iamManagedPolicies string[]
    iamPolicyJson string
    iamUserPolicyJson string
    id string
    The ID of this resource.
    region string
    vpc string
    account_id str
    cluster str
    iam_managed_policies Sequence[str]
    iam_policy_json str
    iam_user_policy_json str
    id str
    The ID of this resource.
    region str
    vpc str
    accountId String
    cluster String
    iamManagedPolicies List<String>
    iamPolicyJson String
    iamUserPolicyJson String
    id String
    The ID of this resource.
    region String
    vpc String

    Package Details

    Repository
    castai castai/terraform-provider-castai
    License
    Notes
    This Pulumi package is based on the castai Terraform Provider.
    castai logo
    castai 7.44.0 published on Friday, Mar 21, 2025 by castai