cuddly-computer-18851
12/22/2022, 10:56 PMacoustic-cricket-46601
12/23/2022, 4:48 PMimport * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const VPC_CNI = new aws.eks.Addon("VPC_CNI", {
clusterName: kubectl get .${env},
addonName: "vpc-cni",
});
const COREDNS = new aws.eks.Addon("coredns", {
clusterName: aws_eks_cluster.${env},
addonName: "coredns",
addonVersion: "v1.8.7-eksbuild.3",
resolveConflicts: "PRESERVE",
});
const kube_proxy = new aws.eks.Addon("kube_proxy", {
clusterName: aws_eks_cluster.${env},
addonName: "kube-proxy",
addonVersion: "v1.21.12-eksbuild.2",
resolveConflicts: "PRESERVE",
});
export class Addon extends pulumi.CustomResource {
public static get(name: string, id: pulumi.Input<pulumi.ID>, state: AddonState, opts: pulumi.CustomResourceOptions): Addon {
return new Addon(vpc-cni, <any>state, { ...opts, id: id });
}
public static get(name: string, id: pulumi.Input<pulumi.ID>, state: AddonState, opts: pulumi.CustomResourceOptions): Addon {
return new Addon(coredns, <any>state, { ...opts, id: id });
}
public static get(name: string, id: pulumi.Input<pulumi.ID>, state: AddonState, opts: pulumi.CustomResourceOptions): Addon {
return new Addon(kube-proxy, <any>state, { ...opts, id: id });
}
public static readonly __pulumiType = 'aws:eks/addon:Addon';
public static isInstance(obj: any): obj is Addon {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Addon.__pulumiType;
}
}
function constructor(name: void, string: any, args: any, AddonArgs: any, arg4: any) {
throw new Error("Function not implemented.");
}
cuddly-computer-18851
12/26/2022, 12:35 AMimport * as aws from "@pulumi/aws";
import { clusterName } from "./config.ts";
import { awsProvider as provider } from "./provider.ts";
export const vpcCni = new aws.eks.Addon("VPC_CNI", {
clusterName,
addonName: "vpc-cni",
}, { provider });
export const coireDns = new aws.eks.Addon("coredns", {
clusterName,
addonName: "coredns",
addonVersion: "v1.8.7-eksbuild.3",
resolveConflicts: "PRESERVE",
}, { provider });
export const kubeProxy = new aws.eks.Addon("kube_proxy", {
clusterName,
addonName: "kube-proxy",
addonVersion: "v1.21.12-eksbuild.2",
resolveConflicts: "PRESERVE",
}, { provider });
I'd try something like this, where you define your cluster name and provider in appropriate files, then import them here.
You don't appear to be doing anything w/ that custom resource so I'd just leave it out. hope this helps!acoustic-cricket-46601
12/26/2022, 9:36 AM