crossplane-contrib/provider-aws

Issue "failed to satisfy constraint: Member must have length greater than or equal to 20" while creating Policy

indra0007 opened this issue · 1 comments

What happened?

Recently we noticed that AWS Policies are not being created properly. On further looking found out that Policy crosssplane manifest is failing with below error message.

failed to get IAM Policy: api error ValidationError: 1 validation error detected: Value '<policy name>' at 'policyArn' failed to satisfy constraint: Member must have length greater than or equal to 20

Previously when we created the policy using crossplane, crossplane used to update crossplane.io/external-name with full policy arn (arn:aws:iam::<account id >:policy/<policy name>) and everything used to be fine. Now we found out crossplane is setting only <policy name> instead of full arn in crossplane.io/external-name. Hence none of the new policies are getting created. Manual updation of crossplane.io/external-name to set to full policy arn temporarily fixed the issue.

How can we reproduce it?

Try to create a Policy.iam.aws.crossplane.io using below mentioned version

What environment did it happen in?

Aws provider version: v0.45.0.
Crossplane version: v1.14.2

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.