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

fix(cloud/stack): default to Slug for external-name #224

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

Duologic
Copy link
Member

@Duologic Duologic commented Dec 23, 2024

Description of your changes

Currently when a resource has configured an external-name with a slug, Crossplane will happily import it be afterwards change the external-name to the ID, this'll flip-flop when using a composition or flux to create this resource.

As Cloud Stacks can either be imported by ID or by Slug, we'll default to slug instead of ID as the ID can't be known upfront. This'll allow us to import existing instances more consistently.

Also see: https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/cloud_stack#import

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

I'm planning to run this in a dev cluster soon after merge.

For reviewers

config/ has the configuration for the upjet code generator

docs for the change in this PR can be read here: https://github.com/crossplane/upjet/blob/main/docs/configuring-a-resource.md and here: https://pkg.go.dev/github.com/crossplane/[email protected]/pkg/config#ExternalName

@Duologic Duologic force-pushed the duologic/cloud_stack_external_name branch from 7cc7685 to 2ccb136 Compare December 23, 2024 22:54
@Duologic Duologic marked this pull request as ready for review December 23, 2024 22:58
@Duologic Duologic requested a review from a team as a code owner December 23, 2024 22:58
@Duologic Duologic force-pushed the duologic/cloud_stack_external_name branch from 2ccb136 to c5e44a0 Compare December 23, 2024 23:22
@Duologic Duologic force-pushed the duologic/cloud_stack_external_name branch from c5e44a0 to 8c8f180 Compare January 8, 2025 13:52
@Duologic Duologic merged commit 84d8a14 into main Jan 8, 2025
8 checks passed
@Duologic Duologic deleted the duologic/cloud_stack_external_name branch January 8, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants