sparse-intern-71089
03/11/2020, 11:21 PMquiet-morning-24895
03/11/2020, 11:22 PMexport function createCloudwatchMetricsResources(
cluster: eks.Cluster,
clusterName: string
) {
const awsRegion = aws.getRegion().name;
const cloudwatchConfig = new k8s.yaml.ConfigGroup(
"cloudwatch",
{
files: "cwagent/*.yaml",
transformations: [
(obj: any) => {
// Transform the YAML to set the cluster and region names
if (
obj.kind === "ConfigMap" &&
obj.metadata.name === "cwagentconfig"
) {
obj.data["cwagentconfig.json"] = obj.data["cwagentconfig.json"]
.replace(/{{cluster_name}}/g, clusterName)
.replace(/{{region_name}}/g, awsRegion);
}
}
]
},
{ providers: { kubernetes: cluster.provider } }
);
}
gentle-diamond-70147
03/11/2020, 11:24 PMkubeconfig
? It seems like Pulumi isn't finding it.quiet-morning-24895
03/11/2020, 11:33 PMexport const eksClusterKubeconfig = eksCluster.kubeconfig;
quiet-morning-24895
03/11/2020, 11:35 PMcluster.provider
gentle-diamond-70147
03/11/2020, 11:44 PM@pulumi/eks
and cluster.provider
is coming from there?gentle-diamond-70147
03/11/2020, 11:47 PMquiet-morning-24895
03/12/2020, 12:02 AMCreationRoleProvider
to the cluster creation?gentle-diamond-70147
03/12/2020, 12:15 AMquiet-morning-24895
03/12/2020, 12:27 AMprovider
goes into the CreationRoleProvider
?quiet-morning-24895
03/12/2020, 12:28 AMeks.getRoleProvider
quiet-morning-24895
03/12/2020, 3:18 AMup
I get this error:quiet-morning-24895
03/12/2020, 3:18 AMaws:eks:Cluster (eks-cluster-eksCluster):
error: error creating EKS Cluster (infra-test): ResourceInUseException: Cluster already exists with name: infra-test
{
ClusterName: "infra-test",
Message_: "Cluster already exists with name: infra-test"
}
quiet-morning-24895
03/12/2020, 3:18 AMdestroy
?quiet-morning-24895
03/12/2020, 4:34 AMgentle-diamond-70147
03/12/2020, 7:44 PM