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 error when cloning resources #1923

Merged
merged 1 commit into from
Sep 26, 2023
Merged

🐛 fix error when cloning resources #1923

merged 1 commit into from
Sep 26, 2023

Conversation

arlimus
Copy link
Member

@arlimus arlimus commented Sep 26, 2023

Mandatory arguments were never submitted, because the new provider concept meant that we had to request all the fields individually. We were missing a good pattern to execute this.

Turns out the CreateResourceWithID was only used in one place and its primary purpose was to clone the resource. This method has now been adjusted to better reflect its purpose and its arguments can now do the heavy lifting or getting all the necessary fields for cloning the resource. This method can be further refined to grab mandatory fields automatically.

Before:

image

After:

image

Mandatory arguments were never submitted, because the new provider concept meant that we had to request all the fields individually. We were missing a good pattern to execute this.

Turns out the CreateResourceWithID was only used in one place and its primary purpose was to clone the resource. This method has now been adjusted to better reflect its purpose and its arguments can now do the heavy lifting or getting all the necessary fields for cloning the resource. This method can be further refined to grab mandatory fields automatically.

Signed-off-by: Dominik Richter <[email protected]>
Copy link
Contributor

@vjeffrey vjeffrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@vjeffrey vjeffrey merged commit a2b4ee9 into main Sep 26, 2023
10 checks passed
@vjeffrey vjeffrey deleted the dom/clone-resource branch September 26, 2023 04:55
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants