crossplane-contrib / provider-upjet-aws

Official AWS Provider for Crossplane by Upbound.
https://marketplace.upbound.io/providers/upbound/provider-aws
Apache License 2.0
137 stars 112 forks source link

Use ARN as external name for aws_iam_role #1380

Open gadiener opened 6 days ago

gadiener commented 6 days ago

Description of your changes

In this PR I'm changing the external name for aws_iam_role to use the role path and name instead of just the role name. Role names are not unique IDs and it is possible to have in the same AWS account multiple role with the same name but with different paths.

I see the Terraform provider is also using the role name as ID please let me know if you have a better suggestion.

Fixes #1376

I have:

How has this code been tested

Executed tests in the CI, it's not very clear to me how to test this locally, I'd appreciate an hint on that

gadiener commented 6 days ago

/test-examples="examples/iam/v1beta1/role.yaml"

gadiener commented 6 days ago

/test-examples="examples/iam/v1beta1/rolepolicy.yaml"

gadiener commented 6 days ago

I just found the file /config/externalname.go would it be better to apply this change there?

gadiener commented 5 days ago

/test-examples="examples/iam/v1beta1/role.yaml"

gadiener commented 5 days ago

Hi @turkenf sorry for pinging you directly. I'd really appreciate a comment from you on the solution and an hint on what is going on with the failing tests. Thanks

turkenf commented 5 days ago

Hi @gadiener,

Many thanks for your interest and effort. I won't be able to look at this PR soon due to other priorities. But I will try to look at this next week.

gadiener commented 5 days ago

Thanks a lot @turkenf 🙏🏻

gadiener commented 1 day ago

Sure, let's discuss in the issue. I'll keep that open for now