Skip to content

Commit 7db4708

Browse files
committed
Provide azure_rm_resource_info like functionality
1 parent 80b24ce commit 7db4708

File tree

5 files changed

+69
-434
lines changed

5 files changed

+69
-434
lines changed

README.md

+34-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ Assuming you've already created a resource group like
3535

3636
Try out something with resource specific az command like
3737

38-
az servicebus namespace create -g experimental-applicationdevelopment -n myexample-bus1 --sku Standard
38+
az servicebus namespace create -g experimental-applicationdevelopment \
39+
-n myexample-bus1 --sku Standard
3940

4041
The extensive documentation behind `az servicebus --help` helps a lot.
4142
Alternatively or optionaly you can check/edit the resource interactively
@@ -89,6 +90,38 @@ based on the `id` value.
8990
tags:
9091
env: myenv
9192

93+
## Resource info
94+
95+
You can also use azbare just for getting information about existing
96+
azure resources, as a replacement for `azure_rm_resource_info`:
97+
98+
99+
- name: Check the existing service bus
100+
geekq.azbare.resource:
101+
group: experimental-applicationdevelopment
102+
path: /providers/Microsoft.ServiceBus/namespaces/myexample-bus1
103+
state: check
104+
105+
returns
106+
107+
```
108+
ok: [localhost] => changed=false
109+
response:
110+
id: /subscriptions/xxxxx-....
111+
location: Germany West Central
112+
name: myexample-bus1
113+
properties:
114+
createdAt: '2021-09-17T11:51:53.507Z'
115+
metricId: xxxx:myexample-bus1
116+
provisioningState: Succeeded
117+
...
118+
```
119+
120+
For module documentation, see [resource.py](plugins/modules/resource.py#L22).
121+
122+
For more examples see [tests](tests/) folder.
123+
124+
92125
## Installation
93126

94127
pip install -r requirements-azure.txt

0 commit comments

Comments
 (0)