What were you trying to accomplish?
I am trying to create an iamserviceaccount using a configuration file. The name of the service account is provider-aws-*. The * is required here since that is replaced with a release number. You can read more about why this is needed here, if you're interested.
What happened?
I get an error because the eksctl command tries to create a stack name with the service account name which has a * and that violates naming convention for the cloud formation stack name
How to reproduce it?
config.yaml
iam:
withOIDC: true
serviceAccounts:
- metadata:
name: provider-aws-*
namespace: crossplane-system
attachPolicyARNs:
- "REDACTED"
roleName: test-role
roleOnly: true
Command used:
eksctl create iamserviceaccount --config-file="config.yaml" --approve --override-existing-serviceaccounts
Logs
2022-03-11 15:07:44 [ℹ] 1 error(s) occurred and IAM Role stacks haven't been updated properly, you may wish to check CloudFormation console 2022-03-11 15:07:44 [✖] creating CloudFormation stack "eksctl-test-cluster-addon-iamserviceaccount-crossplane-system-provider-aws-*": ValidationError: 1 validation error detected: Value 'eksctl-test-cluster-addon-iamserviceaccount-crossplane-system-provider-aws-*' at 'stackName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]* status code: 400, request id: d82a6797-3439-43c0-84d2-8b2351f4ddbe
Anything else we need to know?
macOS Catalina
Using eksctl installed via brew
Versions
eksctl info
eksctl version: 0.86.0
kubectl version: v1.23.2
OS: darwin
What were you trying to accomplish?
I am trying to create an iamserviceaccount using a configuration file. The name of the service account is
provider-aws-*. The*is required here since that is replaced with a release number. You can read more about why this is needed here, if you're interested.What happened?
I get an error because the eksctl command tries to create a stack name with the service account name which has a
*and that violates naming convention for the cloud formation stack nameHow to reproduce it?
config.yaml
eksctl create iamserviceaccount --config-file="config.yaml" --approve --override-existing-serviceaccountsLogs
2022-03-11 15:07:44 [ℹ] 1 error(s) occurred and IAM Role stacks haven't been updated properly, you may wish to check CloudFormation console 2022-03-11 15:07:44 [✖] creating CloudFormation stack "eksctl-test-cluster-addon-iamserviceaccount-crossplane-system-provider-aws-*": ValidationError: 1 validation error detected: Value 'eksctl-test-cluster-addon-iamserviceaccount-crossplane-system-provider-aws-*' at 'stackName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]* status code: 400, request id: d82a6797-3439-43c0-84d2-8b2351f4ddbeAnything else we need to know?
macOS Catalina
Using eksctl installed via brew
Versions
eksctl info
eksctl version: 0.86.0
kubectl version: v1.23.2
OS: darwin