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

use existing resource group #495

Closed
wants to merge 6 commits into from
Closed

Conversation

tormath1
Copy link
Contributor

@tormath1 tormath1 commented Jan 24, 2024

Use it as a regular Azure test but you can provide the resource group and keep it after the test.

can be used to deploy resources in an existing resource group

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
can be used to deploy instances in.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
@tormath1 tormath1 self-assigned this Jan 24, 2024
@@ -89,7 +89,7 @@ func (ac *cluster) NewMachine(userdata *conf.UserData) (platform.Machine, error)
// delete the Resource Group if the cluster runs in the Flight's image Resource Group
func (ac *cluster) Destroy() {
ac.BaseCluster.Destroy()
if ac.ResourceGroup != ac.flight.ImageResourceGroup {
if ac.ResourceGroup != ac.flight.ImageResourceGroup || ac.flight.Api.Opts.ResourceGroup == "" {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment here? It looks like the additional condition is either not needed or if you want to be sure, then use && ac.flight.Api.Opts.ResourceGroup != "".

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
this can be helpful when we want to exclude from deletion a resource in
a given resource group.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
it preserves the resource group but deletes what we created in it.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
@tormath1 tormath1 changed the title wip: use existing resource group use existing resource group Jan 30, 2024
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
@tormath1
Copy link
Contributor Author

Closing in favor of: #497

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