pulumi-eks
pulumi-eks copied to clipboard
Cluster name with underscores
If the cluster has an underscore in its name:
return new eks.Cluster('eks-cluster', {...})
An error is thrown. Cluster name should be probably normalized internally
Plan apply failed: StorageClass.storage.k8s.io "eks_cluster-gp2-whmfn08q" is invalid: metadata.name:
Invalid value: "eks_cluster-gp2-whmfn08q":
a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character
(e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
After speaking to @roothorp on this, we suggest that the function that creates the storageClass:
createStorageClass(`${name.toLowerCase()}-${storageClasses}`, storageClass, {
just passes the name into the storageClass and then we can call a normalize function on the name here to be compliant as per above