MCPcopy Create free account
hub / github.com/microsoft/PyRIT / create_resource_group

Function create_resource_group

infra/deploy_instance.py:110–123  ·  view source on GitHub ↗

Create an Azure resource group. Args: name (str): The resource group name. location (str): The Azure region. tags (list[str] | None): Tags in 'Key=Value' format.

(*, name: str, location: str, tags: list[str] | None = None)

Source from the content-addressed store, hash-verified

108
109
110def create_resource_group(*, name: str, location: str, tags: list[str] | None = None) -> None:
111 """
112 Create an Azure resource group.
113
114 Args:
115 name (str): The resource group name.
116 location (str): The Azure region.
117 tags (list[str] | None): Tags in 'Key=Value' format.
118 """
119 logger.info("Creating resource group: %s in %s", name, location)
120 cmd = ["group", "create", "--name", name, "--location", location]
121 if tags:
122 cmd += ["--tags"] + tags
123 run_az(args=cmd)
124
125
126def create_entra_app(*, display_name: str, service_management_reference: str = "") -> dict:

Callers 1

mainFunction · 0.85

Calls 1

run_azFunction · 0.70

Tested by

no test coverage detected