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

ACA-1500: Create a common resource management convention for all roles #73

Merged
merged 6 commits into from
May 30, 2024

Conversation

nirarg
Copy link
Contributor

@nirarg nirarg commented May 20, 2024

The following rules must be followed:

  • The main file for each role should include the "Get Resource Group" task.
  • In the "Create" tasks:
    • Verify that if the resource group doesn't exist, the user must provide the region name.
    • If the resource group doesn't exist, create it with the given region name.
  • In the "Delete" tasks:
    • Verify that the resource group exists.
    • After all resources are deleted successfully, if the user requested to delete the resource group, delete it.
    • The role shouldn't include an option for force deleting non-empty resource groups.

Also changing the integration tests to have 2 tests cases:

  1. Pre created Resource Group
  2. Resource Group has to be created and deleted by role

Roles changed in this PR:

  • azure_load_balancer_with_public_ip
  • azure_manage_networking_stack
  • azure_manage_postgresql
  • azure_manage_security_group
  • azure_virtual_machine_with_public_ip

The following roles are not changed in this PR:

  • azure_manage_resource_group
  • azure_manage_network_interface - Its expected in the role that the Resource Group is already created with other dependency resources in it

@nirarg nirarg force-pushed the resource-group-manage branch 2 times, most recently from ad11dfe to 5adad4a Compare May 21, 2024 09:29
@nirarg nirarg force-pushed the resource-group-manage branch 2 times, most recently from 061d843 to e6fa214 Compare May 22, 2024 10:15
@nirarg nirarg force-pushed the resource-group-manage branch from e6fa214 to 62c11ec Compare May 22, 2024 18:01
…ip" role

This is done as part of Resource Group management convention changes for all roles
Jira ticket: ACA-1500

The following rules must be followed:
* The main file for each role should include the "Get Resource Group" task.
* In the "Create" tasks:
   - Verify that if the resource group doesn't exist, the user must provide the region name.
   - If the resource group doesn't exist, create it with the given region name.
* In the "Delete" tasks:
   - Verify that the resource group exists.
   - After all resources are deleted successfully, if the user requested to delete the resource group, delete it.
   - The role shouldn't include an option for force deleting non-empty resource groups.

Also changing the integration tests to have 2 tests cases:
1. Pre created Resource Group
2. Resource Group has to be created and deleted by role
@nirarg nirarg force-pushed the resource-group-manage branch from 62c11ec to 2352e91 Compare May 23, 2024 07:10
nirarg added 3 commits May 23, 2024 11:57
For more info check the description of the following commit:
Change Resource Group management in "azure_load_balancer_with_public_ip" role
This change includes removing "azure_manage_postgresql_delete_option"
variable and adding two specific boolean variables:
- "azure_manage_postgresql_postgresql_delete_server"
- "azure_manage_postgresql_postgresql_delete_resource_group"

For more info check the description of the following commit:
Change Resource Group management in azure_load_balancer_with_public_ip role
For more info check the description of the following commit:
Change Resource Group management in "azure_load_balancer_with_public_ip" role
@nirarg nirarg force-pushed the resource-group-manage branch from 504dfa5 to f561c9f Compare May 23, 2024 08:57
@nirarg nirarg changed the title [WIP] ACA-1500: Create a common resource management convention for all roles ACA-1500: Create a common resource management convention for all roles May 28, 2024
nirarg added 2 commits May 28, 2024 16:07
…c_ip" role

This commit also fix an issue in which the "resource group role" including
task was wrong

For more info check the description of the following commit:
Change Resource Group management in "azure_load_balancer_with_public_ip" role
For more info check the description of the following commit:
Change Resource Group management in "azure_load_balancer_with_public_ip" role
@nirarg nirarg force-pushed the resource-group-manage branch from f561c9f to 4d7f4fd Compare May 28, 2024 13:08
@anna-savina
Copy link
Collaborator

LGTM

1 similar comment
@prabinovRedhat
Copy link
Collaborator

LGTM

@nirarg nirarg merged commit 58efd10 into redhat-cop:main May 30, 2024
15 checks passed
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.

4 participants