-
Notifications
You must be signed in to change notification settings - Fork 374
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
New vpc/subnet tag feature from #1170 clobbers existing tags when adopting existing resources #1236
Comments
can you add the tags in the manifest definition before importing the resource ? |
That is a possible workaround, although somewhat unreasonable with dynamically generated tags for resources provisioned with tools such as |
This is an issue if importing resources managed by another tool (such as Terraform). The auto-generated Terraform tags are clobbered by crossplane. Duplicating the tags is the manifest is also not a desired option as it forces to duplicate tags that were auto-generated from another tool. Crossplane should leave existing tags untouched and merge in the Crossplane related tags. In addition, importing AWS subnets that have |
Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as |
We have a temporary workaround by denying crossplane access to create/delete VPC subnet tags.
The AWS provider seems to be working (importing the resource) even though it can't tag the resource. |
The general design idea in Crossplane is to have the managed resources as the single source of truth. Unless there are very specific technical reasons to merge external changes with MR settings, the controller should always overwrite settings in the external resource if they are different from the MR. Preventing tag updates by denying access to the tagging API is not recommended since it leads to reconcile failures and will constantly trigger a rescheduling of that resource. I am going to close this as this behaviour is by design. The best approach to this issue is to copy the auto-generated tags from the external resource and add them to the MR manually. |
What happened?
In PR #1170,
adoption of existing VPC or Subnets via external-name annotation will clobber existing tags. This is especially problematic when adopting resources with
aws:
prefixed tags, such as EKSCTL created VPCs/Subnets.I expect this behavior to be optional as stated in the PR. Currently there does not appear to be a simple way to bypass this behavior.
How can we reproduce it?
Adopt any existing VPC or Subnet with pre-existing tags, via external-name annotation.
What environment did it happen in?
Crossplane version: 1.7.0
provider-aws version: 0.25.0
EKS/Kubernetes: 1.21
OS: Amazon Linux 2
The text was updated successfully, but these errors were encountered: