provider-upjet-aws: It is not possible to import securitygroup which is created previously
What happened?
This problem is best described with an example:
Create a managed resource with a securitygroup with deletionPolicy: Orphan
apiVersion: ec2.aws.upbound.io/v1beta1
kind: SecurityGroup
metadata:
name: test-sg-rule-deletion
spec:
deletionPolicy: Orphan
forProvider:
description: test security group import
region: us-east-1
name: testsg
vpcId: vpcxxxx
providerConfigRef:
name: XXXX
Apply the securitygroup Delete the securitygroup Now the securitygroup stays behind in AWS which is as expected. Apply the securitygroup again Now the security will have a reconcile error and cannot create a duplicate groupname.
apply failed: creating Security Group (testsg): InvalidGroup.Duplicate:
The security group 'testsgv3' already exists for VPC 'vpc-XXX'
code: 400
Tried using crossplane.io/external-name annotation but the external name for a securitygroup is a securitygroup ID which is random and generated by aws.
We expect that it can reconcile the existing securitygroup.
We want to import this created securitygroup but this is not possible this way.
This also prevents us from migrating from crossplane-contrib/provider-aws to the official provider.
This was an issue with crossplane-contrib/provider-aws(https://github.com/crossplane-contrib/provider-aws/issues/1175) but they seemed to have fixed it.
Expected behavior is for the securitygroup to reconcile based on name instead of id which is generated by aws(which we have no control over or means to get it)
How can we reproduce it?
Above steps should help to reproduce the issue
What environment did it happen in?
- Crossplane Version: v0.12.1
- Provider Version: 0.37.0
- Kubernetes Version: 1.25
- Kubernetes Distribution: EKS
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 29 (1 by maintainers)
@nujragan, any progress here?