Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy VPC resources with non crossplane VPC #2101

Open
afreyermuth98 opened this issue Oct 7, 2024 · 3 comments
Open

Deploy VPC resources with non crossplane VPC #2101

afreyermuth98 opened this issue Oct 7, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@afreyermuth98
Copy link

What happened?

I wanted to deploy a security group in my existing AWS VPC.
But it looks like we need to have created the VPC using crossplane to deploy resources in int which is kinda annoying.
Is there a way to do it or it's mandatory to have the VPC created with crossplane ?

cannot resolve references: mg.Spec.ForProvider.VPCID: cannot get
referenced resource: VPC.ec2.aws.crossplane.io "vpc-XXX"
not found

How can we reproduce it?

Create a ec2 security group with crossplane that references a VPC non created with crossplane

What environment did it happen in?

Crossplane version: 1.17.0

  • Cloud provider or hardware configuration: AWS
  • Kubernetes version (use kubectl version) : 1.29
  • Kubernetes distribution (e.g. Tectonic, GKE, OpenShift): EKS
@afreyermuth98 afreyermuth98 added the bug Something isn't working label Oct 7, 2024
@bobh66
Copy link
Contributor

bobh66 commented Oct 7, 2024

You can specify the spec.forProvider.vpcId explicitly in the SecurityGroup resource. If you use spec.forProvider.vpcRef.name then it will look for a corresponding Crossplane resource.

@afreyermuth98
Copy link
Author

@bobh66 ok and with vpcId if I destroy then the security group it does not alter the VPC ?
I mean the VPC will stay independant from crossplane ?

@bobh66
Copy link
Contributor

bobh66 commented Oct 7, 2024

Yes - as long as there is no Managed Resource that controls the VPC it will remain untouched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants