crossplane-contrib / function-go-templating

A Go templating composition function
https://crossplane.io
Apache License 2.0
37 stars 26 forks source link

ARN decoding functionality #96

Open danielloader opened 1 month ago

danielloader commented 1 month ago

What problem are you facing?

Being able to decode the ARN fields on AWS objects to get components is handy for populating in IAM Role/Policy templates and other use cases.

I appreciate this is an AWS specific function so would need to be named accordingly e.g. awsArn

Prior art can be found via terraform

How could this Function help solve your problem?

The use case I'd like to utilise it for is referencing an EKS MR and knowing the region it's deployed in to - as far as I can see the only time this is referenced is the .status.atProvider.arn field.

You can play around with sprig's split functionality to split on colons, but that's what utility functions are for right?