github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/eks/addon.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package eks
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Manages an EKS add-on.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := eks.NewAddon(ctx, "example", &eks.AddonArgs{
    33  //				ClusterName: pulumi.Any(exampleAwsEksCluster.Name),
    34  //				AddonName:   pulumi.String("vpc-cni"),
    35  //			})
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  //
    46  // ## Example Update add-on usage with resolveConflictsOnUpdate and PRESERVE
    47  //
    48  // `resolveConflictsOnUpdate` with `PRESERVE` can be used to retain the config changes applied to the add-on with kubectl while upgrading to a newer version of the add-on.
    49  //
    50  // <!--Start PulumiCodeChooser -->
    51  // ```go
    52  // package main
    53  //
    54  // import (
    55  //
    56  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks"
    57  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    58  //
    59  // )
    60  //
    61  //	func main() {
    62  //		pulumi.Run(func(ctx *pulumi.Context) error {
    63  //			_, err := eks.NewAddon(ctx, "example", &eks.AddonArgs{
    64  //				ClusterName:              pulumi.Any(exampleAwsEksCluster.Name),
    65  //				AddonName:                pulumi.String("coredns"),
    66  //				AddonVersion:             pulumi.String("v1.10.1-eksbuild.1"),
    67  //				ResolveConflictsOnUpdate: pulumi.String("PRESERVE"),
    68  //			})
    69  //			if err != nil {
    70  //				return err
    71  //			}
    72  //			return nil
    73  //		})
    74  //	}
    75  //
    76  // ```
    77  // <!--End PulumiCodeChooser -->
    78  //
    79  // ## Example add-on usage with custom configurationValues
    80  //
    81  // Custom add-on configuration can be passed using `configurationValues` as a single JSON string while creating or updating the add-on.
    82  //
    83  // > **Note:** `configurationValues` is a single JSON string should match the valid JSON schema for each add-on with specific version.
    84  //
    85  // To find the correct JSON schema for each add-on can be extracted using [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html) call.
    86  // This below is an example for extracting the `configurationValues` schema for `coredns`.
    87  //
    88  // Example to create a `coredns` managed addon with custom `configurationValues`.
    89  //
    90  // <!--Start PulumiCodeChooser -->
    91  // ```go
    92  // package main
    93  //
    94  // import (
    95  //
    96  //	"encoding/json"
    97  //
    98  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks"
    99  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   100  //
   101  // )
   102  //
   103  //	func main() {
   104  //		pulumi.Run(func(ctx *pulumi.Context) error {
   105  //			tmpJSON0, err := json.Marshal(map[string]interface{}{
   106  //				"replicaCount": 4,
   107  //				"resources": map[string]interface{}{
   108  //					"limits": map[string]interface{}{
   109  //						"cpu":    "100m",
   110  //						"memory": "150Mi",
   111  //					},
   112  //					"requests": map[string]interface{}{
   113  //						"cpu":    "100m",
   114  //						"memory": "150Mi",
   115  //					},
   116  //				},
   117  //			})
   118  //			if err != nil {
   119  //				return err
   120  //			}
   121  //			json0 := string(tmpJSON0)
   122  //			_, err = eks.NewAddon(ctx, "example", &eks.AddonArgs{
   123  //				ClusterName:              pulumi.String("mycluster"),
   124  //				AddonName:                pulumi.String("coredns"),
   125  //				AddonVersion:             pulumi.String("v1.10.1-eksbuild.1"),
   126  //				ResolveConflictsOnCreate: pulumi.String("OVERWRITE"),
   127  //				ConfigurationValues:      pulumi.String(json0),
   128  //			})
   129  //			if err != nil {
   130  //				return err
   131  //			}
   132  //			return nil
   133  //		})
   134  //	}
   135  //
   136  // ```
   137  // <!--End PulumiCodeChooser -->
   138  //
   139  // ### Example IAM Role for EKS Addon "vpc-cni" with AWS managed policy
   140  //
   141  // <!--Start PulumiCodeChooser -->
   142  // ```go
   143  // package main
   144  //
   145  // import (
   146  //
   147  //	"fmt"
   148  //
   149  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks"
   150  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
   151  //	"github.com/pulumi/pulumi-std/sdk/go/std"
   152  //	"github.com/pulumi/pulumi-tls/sdk/v4/go/tls"
   153  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   154  //
   155  // )
   156  //
   157  //	func main() {
   158  //		pulumi.Run(func(ctx *pulumi.Context) error {
   159  //			exampleCluster, err := eks.NewCluster(ctx, "example", nil)
   160  //			if err != nil {
   161  //				return err
   162  //			}
   163  //			example := exampleCluster.Identities.ApplyT(func(identities []eks.ClusterIdentity) (tls.GetCertificateResult, error) {
   164  //				return tls.GetCertificateOutput(ctx, tls.GetCertificateOutputArgs{
   165  //					Url: identities[0].Oidcs[0].Issuer,
   166  //				}, nil), nil
   167  //			}).(tls.GetCertificateResultOutput)
   168  //			exampleOpenIdConnectProvider, err := iam.NewOpenIdConnectProvider(ctx, "example", &iam.OpenIdConnectProviderArgs{
   169  //				ClientIdLists: pulumi.StringArray{
   170  //					pulumi.String("sts.amazonaws.com"),
   171  //				},
   172  //				ThumbprintLists: pulumi.StringArray{
   173  //					example.ApplyT(func(example tls.GetCertificateResult) (*string, error) {
   174  //						return &example.Certificates[0].Sha1Fingerprint, nil
   175  //					}).(pulumi.StringPtrOutput),
   176  //				},
   177  //				Url: exampleCluster.Identities.ApplyT(func(identities []eks.ClusterIdentity) (*string, error) {
   178  //					return &identities[0].Oidcs[0].Issuer, nil
   179  //				}).(pulumi.StringPtrOutput),
   180  //			})
   181  //			if err != nil {
   182  //				return err
   183  //			}
   184  //			exampleAssumeRolePolicy := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{
   185  //				Statements: iam.GetPolicyDocumentStatementArray{
   186  //					&iam.GetPolicyDocumentStatementArgs{
   187  //						Actions: pulumi.StringArray{
   188  //							pulumi.String("sts:AssumeRoleWithWebIdentity"),
   189  //						},
   190  //						Effect: pulumi.String("Allow"),
   191  //						Conditions: iam.GetPolicyDocumentStatementConditionArray{
   192  //							&iam.GetPolicyDocumentStatementConditionArgs{
   193  //								Test: pulumi.String("StringEquals"),
   194  //								Variable: std.ReplaceOutput(ctx, std.ReplaceOutputArgs{
   195  //									Text:    exampleOpenIdConnectProvider.Url,
   196  //									Search:  pulumi.String("https://"),
   197  //									Replace: pulumi.String(""),
   198  //								}, nil).ApplyT(func(invoke std.ReplaceResult) (string, error) {
   199  //									return fmt.Sprintf("%v:sub", invoke.Result), nil
   200  //								}).(pulumi.StringOutput),
   201  //								Values: pulumi.StringArray{
   202  //									pulumi.String("system:serviceaccount:kube-system:aws-node"),
   203  //								},
   204  //							},
   205  //						},
   206  //						Principals: iam.GetPolicyDocumentStatementPrincipalArray{
   207  //							&iam.GetPolicyDocumentStatementPrincipalArgs{
   208  //								Identifiers: pulumi.StringArray{
   209  //									exampleOpenIdConnectProvider.Arn,
   210  //								},
   211  //								Type: pulumi.String("Federated"),
   212  //							},
   213  //						},
   214  //					},
   215  //				},
   216  //			}, nil)
   217  //			exampleRole, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
   218  //				AssumeRolePolicy: exampleAssumeRolePolicy.ApplyT(func(exampleAssumeRolePolicy iam.GetPolicyDocumentResult) (*string, error) {
   219  //					return &exampleAssumeRolePolicy.Json, nil
   220  //				}).(pulumi.StringPtrOutput),
   221  //				Name: pulumi.String("example-vpc-cni-role"),
   222  //			})
   223  //			if err != nil {
   224  //				return err
   225  //			}
   226  //			_, err = iam.NewRolePolicyAttachment(ctx, "example", &iam.RolePolicyAttachmentArgs{
   227  //				PolicyArn: pulumi.String("arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy"),
   228  //				Role:      exampleRole.Name,
   229  //			})
   230  //			if err != nil {
   231  //				return err
   232  //			}
   233  //			return nil
   234  //		})
   235  //	}
   236  //
   237  // ```
   238  // <!--End PulumiCodeChooser -->
   239  //
   240  // ## Import
   241  //
   242  // Using `pulumi import`, import EKS add-on using the `cluster_name` and `addon_name` separated by a colon (`:`). For example:
   243  //
   244  // ```sh
   245  // $ pulumi import aws:eks/addon:Addon my_eks_addon my_cluster_name:my_addon_name
   246  // ```
   247  type Addon struct {
   248  	pulumi.CustomResourceState
   249  
   250  	// Name of the EKS add-on. The name must match one of
   251  	// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   252  	AddonName pulumi.StringOutput `pulumi:"addonName"`
   253  	// The version of the EKS add-on. The version must
   254  	// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   255  	AddonVersion pulumi.StringOutput `pulumi:"addonVersion"`
   256  	// Amazon Resource Name (ARN) of the EKS add-on.
   257  	Arn pulumi.StringOutput `pulumi:"arn"`
   258  	// Name of the EKS Cluster.
   259  	//
   260  	// The following arguments are optional:
   261  	ClusterName pulumi.StringOutput `pulumi:"clusterName"`
   262  	// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
   263  	ConfigurationValues pulumi.StringOutput `pulumi:"configurationValues"`
   264  	// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was created.
   265  	CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
   266  	// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was updated.
   267  	ModifiedAt pulumi.StringOutput `pulumi:"modifiedAt"`
   268  	// Indicates if you want to preserve the created resources when deleting the EKS add-on.
   269  	Preserve pulumi.BoolPtrOutput `pulumi:"preserve"`
   270  	// Define how to resolve parameter value conflicts when migrating an existing add-on to an Amazon EKS add-on or when applying version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. Note that `PRESERVE` is only valid on addon update, not for initial addon creation. If you need to set this to `PRESERVE`, use the `resolveConflictsOnCreate` and `resolveConflictsOnUpdate` attributes instead. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   271  	//
   272  	// Deprecated: The "resolveConflicts" attribute can't be set to "PRESERVE" on initial resource creation. Use "resolveConflictsOnCreate" and/or "resolveConflictsOnUpdate" instead
   273  	ResolveConflicts pulumi.StringPtrOutput `pulumi:"resolveConflicts"`
   274  	// How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are `NONE` and `OVERWRITE`. For more details see the [CreateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html) API Docs.
   275  	ResolveConflictsOnCreate pulumi.StringPtrOutput `pulumi:"resolveConflictsOnCreate"`
   276  	// How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are `NONE`, `OVERWRITE`, and `PRESERVE`. For more details see the [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   277  	ResolveConflictsOnUpdate pulumi.StringPtrOutput `pulumi:"resolveConflictsOnUpdate"`
   278  	// The Amazon Resource Name (ARN) of an
   279  	// existing IAM role to bind to the add-on's service account. The role must be
   280  	// assigned the IAM permissions required by the add-on. If you don't specify
   281  	// an existing IAM role, then the add-on uses the permissions assigned to the node
   282  	// IAM role. For more information, see [Amazon EKS node IAM role](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
   283  	// in the Amazon EKS User Guide.
   284  	//
   285  	// > **Note:** To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC)
   286  	// provider created for your cluster. For more information, [see Enabling IAM roles
   287  	// for service accounts on your cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
   288  	// in the Amazon EKS User Guide.
   289  	ServiceAccountRoleArn pulumi.StringPtrOutput `pulumi:"serviceAccountRoleArn"`
   290  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   291  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   292  	// (Optional) Key-value map of resource tags, including those inherited from the provider `defaultTags` configuration block.
   293  	//
   294  	// Deprecated: Please use `tags` instead.
   295  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   296  }
   297  
   298  // NewAddon registers a new resource with the given unique name, arguments, and options.
   299  func NewAddon(ctx *pulumi.Context,
   300  	name string, args *AddonArgs, opts ...pulumi.ResourceOption) (*Addon, error) {
   301  	if args == nil {
   302  		return nil, errors.New("missing one or more required arguments")
   303  	}
   304  
   305  	if args.AddonName == nil {
   306  		return nil, errors.New("invalid value for required argument 'AddonName'")
   307  	}
   308  	if args.ClusterName == nil {
   309  		return nil, errors.New("invalid value for required argument 'ClusterName'")
   310  	}
   311  	opts = internal.PkgResourceDefaultOpts(opts)
   312  	var resource Addon
   313  	err := ctx.RegisterResource("aws:eks/addon:Addon", name, args, &resource, opts...)
   314  	if err != nil {
   315  		return nil, err
   316  	}
   317  	return &resource, nil
   318  }
   319  
   320  // GetAddon gets an existing Addon resource's state with the given name, ID, and optional
   321  // state properties that are used to uniquely qualify the lookup (nil if not required).
   322  func GetAddon(ctx *pulumi.Context,
   323  	name string, id pulumi.IDInput, state *AddonState, opts ...pulumi.ResourceOption) (*Addon, error) {
   324  	var resource Addon
   325  	err := ctx.ReadResource("aws:eks/addon:Addon", name, id, state, &resource, opts...)
   326  	if err != nil {
   327  		return nil, err
   328  	}
   329  	return &resource, nil
   330  }
   331  
   332  // Input properties used for looking up and filtering Addon resources.
   333  type addonState struct {
   334  	// Name of the EKS add-on. The name must match one of
   335  	// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   336  	AddonName *string `pulumi:"addonName"`
   337  	// The version of the EKS add-on. The version must
   338  	// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   339  	AddonVersion *string `pulumi:"addonVersion"`
   340  	// Amazon Resource Name (ARN) of the EKS add-on.
   341  	Arn *string `pulumi:"arn"`
   342  	// Name of the EKS Cluster.
   343  	//
   344  	// The following arguments are optional:
   345  	ClusterName *string `pulumi:"clusterName"`
   346  	// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
   347  	ConfigurationValues *string `pulumi:"configurationValues"`
   348  	// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was created.
   349  	CreatedAt *string `pulumi:"createdAt"`
   350  	// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was updated.
   351  	ModifiedAt *string `pulumi:"modifiedAt"`
   352  	// Indicates if you want to preserve the created resources when deleting the EKS add-on.
   353  	Preserve *bool `pulumi:"preserve"`
   354  	// Define how to resolve parameter value conflicts when migrating an existing add-on to an Amazon EKS add-on or when applying version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. Note that `PRESERVE` is only valid on addon update, not for initial addon creation. If you need to set this to `PRESERVE`, use the `resolveConflictsOnCreate` and `resolveConflictsOnUpdate` attributes instead. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   355  	//
   356  	// Deprecated: The "resolveConflicts" attribute can't be set to "PRESERVE" on initial resource creation. Use "resolveConflictsOnCreate" and/or "resolveConflictsOnUpdate" instead
   357  	ResolveConflicts *string `pulumi:"resolveConflicts"`
   358  	// How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are `NONE` and `OVERWRITE`. For more details see the [CreateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html) API Docs.
   359  	ResolveConflictsOnCreate *string `pulumi:"resolveConflictsOnCreate"`
   360  	// How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are `NONE`, `OVERWRITE`, and `PRESERVE`. For more details see the [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   361  	ResolveConflictsOnUpdate *string `pulumi:"resolveConflictsOnUpdate"`
   362  	// The Amazon Resource Name (ARN) of an
   363  	// existing IAM role to bind to the add-on's service account. The role must be
   364  	// assigned the IAM permissions required by the add-on. If you don't specify
   365  	// an existing IAM role, then the add-on uses the permissions assigned to the node
   366  	// IAM role. For more information, see [Amazon EKS node IAM role](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
   367  	// in the Amazon EKS User Guide.
   368  	//
   369  	// > **Note:** To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC)
   370  	// provider created for your cluster. For more information, [see Enabling IAM roles
   371  	// for service accounts on your cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
   372  	// in the Amazon EKS User Guide.
   373  	ServiceAccountRoleArn *string `pulumi:"serviceAccountRoleArn"`
   374  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   375  	Tags map[string]string `pulumi:"tags"`
   376  	// (Optional) Key-value map of resource tags, including those inherited from the provider `defaultTags` configuration block.
   377  	//
   378  	// Deprecated: Please use `tags` instead.
   379  	TagsAll map[string]string `pulumi:"tagsAll"`
   380  }
   381  
   382  type AddonState struct {
   383  	// Name of the EKS add-on. The name must match one of
   384  	// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   385  	AddonName pulumi.StringPtrInput
   386  	// The version of the EKS add-on. The version must
   387  	// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   388  	AddonVersion pulumi.StringPtrInput
   389  	// Amazon Resource Name (ARN) of the EKS add-on.
   390  	Arn pulumi.StringPtrInput
   391  	// Name of the EKS Cluster.
   392  	//
   393  	// The following arguments are optional:
   394  	ClusterName pulumi.StringPtrInput
   395  	// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
   396  	ConfigurationValues pulumi.StringPtrInput
   397  	// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was created.
   398  	CreatedAt pulumi.StringPtrInput
   399  	// Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was updated.
   400  	ModifiedAt pulumi.StringPtrInput
   401  	// Indicates if you want to preserve the created resources when deleting the EKS add-on.
   402  	Preserve pulumi.BoolPtrInput
   403  	// Define how to resolve parameter value conflicts when migrating an existing add-on to an Amazon EKS add-on or when applying version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. Note that `PRESERVE` is only valid on addon update, not for initial addon creation. If you need to set this to `PRESERVE`, use the `resolveConflictsOnCreate` and `resolveConflictsOnUpdate` attributes instead. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   404  	//
   405  	// Deprecated: The "resolveConflicts" attribute can't be set to "PRESERVE" on initial resource creation. Use "resolveConflictsOnCreate" and/or "resolveConflictsOnUpdate" instead
   406  	ResolveConflicts pulumi.StringPtrInput
   407  	// How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are `NONE` and `OVERWRITE`. For more details see the [CreateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html) API Docs.
   408  	ResolveConflictsOnCreate pulumi.StringPtrInput
   409  	// How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are `NONE`, `OVERWRITE`, and `PRESERVE`. For more details see the [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   410  	ResolveConflictsOnUpdate pulumi.StringPtrInput
   411  	// The Amazon Resource Name (ARN) of an
   412  	// existing IAM role to bind to the add-on's service account. The role must be
   413  	// assigned the IAM permissions required by the add-on. If you don't specify
   414  	// an existing IAM role, then the add-on uses the permissions assigned to the node
   415  	// IAM role. For more information, see [Amazon EKS node IAM role](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
   416  	// in the Amazon EKS User Guide.
   417  	//
   418  	// > **Note:** To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC)
   419  	// provider created for your cluster. For more information, [see Enabling IAM roles
   420  	// for service accounts on your cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
   421  	// in the Amazon EKS User Guide.
   422  	ServiceAccountRoleArn pulumi.StringPtrInput
   423  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   424  	Tags pulumi.StringMapInput
   425  	// (Optional) Key-value map of resource tags, including those inherited from the provider `defaultTags` configuration block.
   426  	//
   427  	// Deprecated: Please use `tags` instead.
   428  	TagsAll pulumi.StringMapInput
   429  }
   430  
   431  func (AddonState) ElementType() reflect.Type {
   432  	return reflect.TypeOf((*addonState)(nil)).Elem()
   433  }
   434  
   435  type addonArgs struct {
   436  	// Name of the EKS add-on. The name must match one of
   437  	// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   438  	AddonName string `pulumi:"addonName"`
   439  	// The version of the EKS add-on. The version must
   440  	// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   441  	AddonVersion *string `pulumi:"addonVersion"`
   442  	// Name of the EKS Cluster.
   443  	//
   444  	// The following arguments are optional:
   445  	ClusterName string `pulumi:"clusterName"`
   446  	// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
   447  	ConfigurationValues *string `pulumi:"configurationValues"`
   448  	// Indicates if you want to preserve the created resources when deleting the EKS add-on.
   449  	Preserve *bool `pulumi:"preserve"`
   450  	// Define how to resolve parameter value conflicts when migrating an existing add-on to an Amazon EKS add-on or when applying version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. Note that `PRESERVE` is only valid on addon update, not for initial addon creation. If you need to set this to `PRESERVE`, use the `resolveConflictsOnCreate` and `resolveConflictsOnUpdate` attributes instead. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   451  	//
   452  	// Deprecated: The "resolveConflicts" attribute can't be set to "PRESERVE" on initial resource creation. Use "resolveConflictsOnCreate" and/or "resolveConflictsOnUpdate" instead
   453  	ResolveConflicts *string `pulumi:"resolveConflicts"`
   454  	// How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are `NONE` and `OVERWRITE`. For more details see the [CreateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html) API Docs.
   455  	ResolveConflictsOnCreate *string `pulumi:"resolveConflictsOnCreate"`
   456  	// How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are `NONE`, `OVERWRITE`, and `PRESERVE`. For more details see the [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   457  	ResolveConflictsOnUpdate *string `pulumi:"resolveConflictsOnUpdate"`
   458  	// The Amazon Resource Name (ARN) of an
   459  	// existing IAM role to bind to the add-on's service account. The role must be
   460  	// assigned the IAM permissions required by the add-on. If you don't specify
   461  	// an existing IAM role, then the add-on uses the permissions assigned to the node
   462  	// IAM role. For more information, see [Amazon EKS node IAM role](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
   463  	// in the Amazon EKS User Guide.
   464  	//
   465  	// > **Note:** To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC)
   466  	// provider created for your cluster. For more information, [see Enabling IAM roles
   467  	// for service accounts on your cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
   468  	// in the Amazon EKS User Guide.
   469  	ServiceAccountRoleArn *string `pulumi:"serviceAccountRoleArn"`
   470  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   471  	Tags map[string]string `pulumi:"tags"`
   472  }
   473  
   474  // The set of arguments for constructing a Addon resource.
   475  type AddonArgs struct {
   476  	// Name of the EKS add-on. The name must match one of
   477  	// the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   478  	AddonName pulumi.StringInput
   479  	// The version of the EKS add-on. The version must
   480  	// match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   481  	AddonVersion pulumi.StringPtrInput
   482  	// Name of the EKS Cluster.
   483  	//
   484  	// The following arguments are optional:
   485  	ClusterName pulumi.StringInput
   486  	// custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
   487  	ConfigurationValues pulumi.StringPtrInput
   488  	// Indicates if you want to preserve the created resources when deleting the EKS add-on.
   489  	Preserve pulumi.BoolPtrInput
   490  	// Define how to resolve parameter value conflicts when migrating an existing add-on to an Amazon EKS add-on or when applying version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. Note that `PRESERVE` is only valid on addon update, not for initial addon creation. If you need to set this to `PRESERVE`, use the `resolveConflictsOnCreate` and `resolveConflictsOnUpdate` attributes instead. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   491  	//
   492  	// Deprecated: The "resolveConflicts" attribute can't be set to "PRESERVE" on initial resource creation. Use "resolveConflictsOnCreate" and/or "resolveConflictsOnUpdate" instead
   493  	ResolveConflicts pulumi.StringPtrInput
   494  	// How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are `NONE` and `OVERWRITE`. For more details see the [CreateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html) API Docs.
   495  	ResolveConflictsOnCreate pulumi.StringPtrInput
   496  	// How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are `NONE`, `OVERWRITE`, and `PRESERVE`. For more details see the [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   497  	ResolveConflictsOnUpdate pulumi.StringPtrInput
   498  	// The Amazon Resource Name (ARN) of an
   499  	// existing IAM role to bind to the add-on's service account. The role must be
   500  	// assigned the IAM permissions required by the add-on. If you don't specify
   501  	// an existing IAM role, then the add-on uses the permissions assigned to the node
   502  	// IAM role. For more information, see [Amazon EKS node IAM role](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
   503  	// in the Amazon EKS User Guide.
   504  	//
   505  	// > **Note:** To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC)
   506  	// provider created for your cluster. For more information, [see Enabling IAM roles
   507  	// for service accounts on your cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
   508  	// in the Amazon EKS User Guide.
   509  	ServiceAccountRoleArn pulumi.StringPtrInput
   510  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   511  	Tags pulumi.StringMapInput
   512  }
   513  
   514  func (AddonArgs) ElementType() reflect.Type {
   515  	return reflect.TypeOf((*addonArgs)(nil)).Elem()
   516  }
   517  
   518  type AddonInput interface {
   519  	pulumi.Input
   520  
   521  	ToAddonOutput() AddonOutput
   522  	ToAddonOutputWithContext(ctx context.Context) AddonOutput
   523  }
   524  
   525  func (*Addon) ElementType() reflect.Type {
   526  	return reflect.TypeOf((**Addon)(nil)).Elem()
   527  }
   528  
   529  func (i *Addon) ToAddonOutput() AddonOutput {
   530  	return i.ToAddonOutputWithContext(context.Background())
   531  }
   532  
   533  func (i *Addon) ToAddonOutputWithContext(ctx context.Context) AddonOutput {
   534  	return pulumi.ToOutputWithContext(ctx, i).(AddonOutput)
   535  }
   536  
   537  // AddonArrayInput is an input type that accepts AddonArray and AddonArrayOutput values.
   538  // You can construct a concrete instance of `AddonArrayInput` via:
   539  //
   540  //	AddonArray{ AddonArgs{...} }
   541  type AddonArrayInput interface {
   542  	pulumi.Input
   543  
   544  	ToAddonArrayOutput() AddonArrayOutput
   545  	ToAddonArrayOutputWithContext(context.Context) AddonArrayOutput
   546  }
   547  
   548  type AddonArray []AddonInput
   549  
   550  func (AddonArray) ElementType() reflect.Type {
   551  	return reflect.TypeOf((*[]*Addon)(nil)).Elem()
   552  }
   553  
   554  func (i AddonArray) ToAddonArrayOutput() AddonArrayOutput {
   555  	return i.ToAddonArrayOutputWithContext(context.Background())
   556  }
   557  
   558  func (i AddonArray) ToAddonArrayOutputWithContext(ctx context.Context) AddonArrayOutput {
   559  	return pulumi.ToOutputWithContext(ctx, i).(AddonArrayOutput)
   560  }
   561  
   562  // AddonMapInput is an input type that accepts AddonMap and AddonMapOutput values.
   563  // You can construct a concrete instance of `AddonMapInput` via:
   564  //
   565  //	AddonMap{ "key": AddonArgs{...} }
   566  type AddonMapInput interface {
   567  	pulumi.Input
   568  
   569  	ToAddonMapOutput() AddonMapOutput
   570  	ToAddonMapOutputWithContext(context.Context) AddonMapOutput
   571  }
   572  
   573  type AddonMap map[string]AddonInput
   574  
   575  func (AddonMap) ElementType() reflect.Type {
   576  	return reflect.TypeOf((*map[string]*Addon)(nil)).Elem()
   577  }
   578  
   579  func (i AddonMap) ToAddonMapOutput() AddonMapOutput {
   580  	return i.ToAddonMapOutputWithContext(context.Background())
   581  }
   582  
   583  func (i AddonMap) ToAddonMapOutputWithContext(ctx context.Context) AddonMapOutput {
   584  	return pulumi.ToOutputWithContext(ctx, i).(AddonMapOutput)
   585  }
   586  
   587  type AddonOutput struct{ *pulumi.OutputState }
   588  
   589  func (AddonOutput) ElementType() reflect.Type {
   590  	return reflect.TypeOf((**Addon)(nil)).Elem()
   591  }
   592  
   593  func (o AddonOutput) ToAddonOutput() AddonOutput {
   594  	return o
   595  }
   596  
   597  func (o AddonOutput) ToAddonOutputWithContext(ctx context.Context) AddonOutput {
   598  	return o
   599  }
   600  
   601  // Name of the EKS add-on. The name must match one of
   602  // the names returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   603  func (o AddonOutput) AddonName() pulumi.StringOutput {
   604  	return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.AddonName }).(pulumi.StringOutput)
   605  }
   606  
   607  // The version of the EKS add-on. The version must
   608  // match one of the versions returned by [describe-addon-versions](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-versions.html).
   609  func (o AddonOutput) AddonVersion() pulumi.StringOutput {
   610  	return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.AddonVersion }).(pulumi.StringOutput)
   611  }
   612  
   613  // Amazon Resource Name (ARN) of the EKS add-on.
   614  func (o AddonOutput) Arn() pulumi.StringOutput {
   615  	return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   616  }
   617  
   618  // Name of the EKS Cluster.
   619  //
   620  // The following arguments are optional:
   621  func (o AddonOutput) ClusterName() pulumi.StringOutput {
   622  	return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput)
   623  }
   624  
   625  // custom configuration values for addons with single JSON string. This JSON string value must match the JSON schema derived from [describe-addon-configuration](https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html).
   626  func (o AddonOutput) ConfigurationValues() pulumi.StringOutput {
   627  	return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.ConfigurationValues }).(pulumi.StringOutput)
   628  }
   629  
   630  // Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was created.
   631  func (o AddonOutput) CreatedAt() pulumi.StringOutput {
   632  	return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
   633  }
   634  
   635  // Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the EKS add-on was updated.
   636  func (o AddonOutput) ModifiedAt() pulumi.StringOutput {
   637  	return o.ApplyT(func(v *Addon) pulumi.StringOutput { return v.ModifiedAt }).(pulumi.StringOutput)
   638  }
   639  
   640  // Indicates if you want to preserve the created resources when deleting the EKS add-on.
   641  func (o AddonOutput) Preserve() pulumi.BoolPtrOutput {
   642  	return o.ApplyT(func(v *Addon) pulumi.BoolPtrOutput { return v.Preserve }).(pulumi.BoolPtrOutput)
   643  }
   644  
   645  // Define how to resolve parameter value conflicts when migrating an existing add-on to an Amazon EKS add-on or when applying version updates to the add-on. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. Note that `PRESERVE` is only valid on addon update, not for initial addon creation. If you need to set this to `PRESERVE`, use the `resolveConflictsOnCreate` and `resolveConflictsOnUpdate` attributes instead. For more details check [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   646  //
   647  // Deprecated: The "resolveConflicts" attribute can't be set to "PRESERVE" on initial resource creation. Use "resolveConflictsOnCreate" and/or "resolveConflictsOnUpdate" instead
   648  func (o AddonOutput) ResolveConflicts() pulumi.StringPtrOutput {
   649  	return o.ApplyT(func(v *Addon) pulumi.StringPtrOutput { return v.ResolveConflicts }).(pulumi.StringPtrOutput)
   650  }
   651  
   652  // How to resolve field value conflicts when migrating a self-managed add-on to an Amazon EKS add-on. Valid values are `NONE` and `OVERWRITE`. For more details see the [CreateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html) API Docs.
   653  func (o AddonOutput) ResolveConflictsOnCreate() pulumi.StringPtrOutput {
   654  	return o.ApplyT(func(v *Addon) pulumi.StringPtrOutput { return v.ResolveConflictsOnCreate }).(pulumi.StringPtrOutput)
   655  }
   656  
   657  // How to resolve field value conflicts for an Amazon EKS add-on if you've changed a value from the Amazon EKS default value. Valid values are `NONE`, `OVERWRITE`, and `PRESERVE`. For more details see the [UpdateAddon](https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html) API Docs.
   658  func (o AddonOutput) ResolveConflictsOnUpdate() pulumi.StringPtrOutput {
   659  	return o.ApplyT(func(v *Addon) pulumi.StringPtrOutput { return v.ResolveConflictsOnUpdate }).(pulumi.StringPtrOutput)
   660  }
   661  
   662  // The Amazon Resource Name (ARN) of an
   663  // existing IAM role to bind to the add-on's service account. The role must be
   664  // assigned the IAM permissions required by the add-on. If you don't specify
   665  // an existing IAM role, then the add-on uses the permissions assigned to the node
   666  // IAM role. For more information, see [Amazon EKS node IAM role](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)
   667  // in the Amazon EKS User Guide.
   668  //
   669  // > **Note:** To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC)
   670  // provider created for your cluster. For more information, [see Enabling IAM roles
   671  // for service accounts on your cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html)
   672  // in the Amazon EKS User Guide.
   673  func (o AddonOutput) ServiceAccountRoleArn() pulumi.StringPtrOutput {
   674  	return o.ApplyT(func(v *Addon) pulumi.StringPtrOutput { return v.ServiceAccountRoleArn }).(pulumi.StringPtrOutput)
   675  }
   676  
   677  // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   678  func (o AddonOutput) Tags() pulumi.StringMapOutput {
   679  	return o.ApplyT(func(v *Addon) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   680  }
   681  
   682  // (Optional) Key-value map of resource tags, including those inherited from the provider `defaultTags` configuration block.
   683  //
   684  // Deprecated: Please use `tags` instead.
   685  func (o AddonOutput) TagsAll() pulumi.StringMapOutput {
   686  	return o.ApplyT(func(v *Addon) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   687  }
   688  
   689  type AddonArrayOutput struct{ *pulumi.OutputState }
   690  
   691  func (AddonArrayOutput) ElementType() reflect.Type {
   692  	return reflect.TypeOf((*[]*Addon)(nil)).Elem()
   693  }
   694  
   695  func (o AddonArrayOutput) ToAddonArrayOutput() AddonArrayOutput {
   696  	return o
   697  }
   698  
   699  func (o AddonArrayOutput) ToAddonArrayOutputWithContext(ctx context.Context) AddonArrayOutput {
   700  	return o
   701  }
   702  
   703  func (o AddonArrayOutput) Index(i pulumi.IntInput) AddonOutput {
   704  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Addon {
   705  		return vs[0].([]*Addon)[vs[1].(int)]
   706  	}).(AddonOutput)
   707  }
   708  
   709  type AddonMapOutput struct{ *pulumi.OutputState }
   710  
   711  func (AddonMapOutput) ElementType() reflect.Type {
   712  	return reflect.TypeOf((*map[string]*Addon)(nil)).Elem()
   713  }
   714  
   715  func (o AddonMapOutput) ToAddonMapOutput() AddonMapOutput {
   716  	return o
   717  }
   718  
   719  func (o AddonMapOutput) ToAddonMapOutputWithContext(ctx context.Context) AddonMapOutput {
   720  	return o
   721  }
   722  
   723  func (o AddonMapOutput) MapIndex(k pulumi.StringInput) AddonOutput {
   724  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Addon {
   725  		return vs[0].(map[string]*Addon)[vs[1].(string)]
   726  	}).(AddonOutput)
   727  }
   728  
   729  func init() {
   730  	pulumi.RegisterInputType(reflect.TypeOf((*AddonInput)(nil)).Elem(), &Addon{})
   731  	pulumi.RegisterInputType(reflect.TypeOf((*AddonArrayInput)(nil)).Elem(), AddonArray{})
   732  	pulumi.RegisterInputType(reflect.TypeOf((*AddonMapInput)(nil)).Elem(), AddonMap{})
   733  	pulumi.RegisterOutputType(AddonOutput{})
   734  	pulumi.RegisterOutputType(AddonArrayOutput{})
   735  	pulumi.RegisterOutputType(AddonMapOutput{})
   736  }