Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions .github/instructions/resourcemanager.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,44 @@ applyTo: "sdk/*/azure_resourcemanager_*/"
# Azure Resource Manager Instructions

- Initialize new Azure Resource Manager (ARM) projects using instructions in `doc/dev/resourcemanager-generation.md`.
- Integration tests under `tests/` in the crate root directory should be generated for client type exported from the crate root e.g., `azure_resourcemanager_keyvault::KeyVaultClient` that show:
- Integration tests under `tests/` in the crate root directory should be generated for all clients exported from the `clients` module e.g., `azure_resourcemanager_keyvault::clients::KeyVaultClient` that show:
- Creating a new resource.
- Listing existing resources available in the current subscription.
- Listing existing resources available in the resource group created for the tests.
- Updating the properties of an existing resource.
- Deleting a resource.
- A `README.md` file in the crate root directory should follow the same structure as `sdk/keyvault/azure_security_keyvault_secrets/README.md` that includes:
- A brief overview of which Azure Resource Provider (RP) it controls.
- How to install the crate.
- How to authenticate the client library using a `DeveloperToolsCredential`.
- Examples of creating, listing, updating, and deleting a resource controlled by the RP.
- Examples of creating, listing, updating, and deleting a resource controlled by the RP using clients exported only from the crate root e.g., `azure_resourcemanager_keyvault::KeyVaultClient` that show:
- A listing of links to those examples should be in the parent heading.
- Code such as `async fn main()` can be elided by using the `include-file` crate and `rust ignore <unique-section-name>` code fences where `unique-section-name` can be imported from within a `tests/readme.rs` file e.g., `sdk/keyvault/azure_security_keyvault_secrets/tests/readme.rs`.
- Do not include any references to the `recording` object; instead, create local variables for recorded properties in `tests/readme.rs` with appropriate names that are used by examples in the `README.md` e.g.,

```rust
let resource_group = recording.var("AZURE_RESOURCE_GROUP", None);
```
```rust
let resource_group = recording.var("KEYVAULT_RESOURCE_GROUP", None);
let tenant_id = recording.var("KEYVAULT_TENANT_ID", None);
```

`KEYVAULT` is replaced with the uppercase `<service>` name in the `sdk/<service>` directory.

- Generate a random name for the individual resource to create, update, and delete instead of getting it from a variable e.g.,

```rust
let resource_name = recording.random_string::<16>(Some("t"));
```

12 is the maximum resource name length and "t" is an optional service name prefix since most cannot start with numbers.
These requirements vary by service.

- Troubleshooting information.
- Contributing information.
- Run markdownlint on the `README.md` and fix all issues.

- `Cargo.toml` should have a `dev-dependency` on `azure_core_test` to add the `tracing` feature:

```toml
azure_core_test = { workspace = true, features = [
"tracing",
] }
```
15 changes: 15 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ members = [
"sdk/identity/azure_identity",
"sdk/eventhubs/azure_messaging_eventhubs",
"sdk/eventhubs/azure_messaging_eventhubs_checkpointstore_blob",
"sdk/keyvault/azure_resourcemanager_keyvault",
"sdk/keyvault/azure_security_keyvault_certificates",
"sdk/keyvault/azure_security_keyvault_keys",
"sdk/keyvault/azure_security_keyvault_secrets",
Expand Down
17 changes: 16 additions & 1 deletion sdk/keyvault/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"../../.vscode/cspell.json"
],
"ignoreWords": [
"byok",
"canonicalizes",
"cbcpad",
"ciphertext",
Expand All @@ -13,18 +14,28 @@
"deletedkeys",
"deletedsecrets",
"deleteissuers",
"deletesas",
"diffie",
"eastus",
"echsm",
"ekus",
"fips",
"getissuers",
"getrotationpolicy",
"getsas",
"innererror",
"keyout",
"listissuers",
"listsas",
"managecontacts",
"manageissuers",
"mhsm",
"mhsmip",
"newkey",
"oaep",
"preprovisioning",
"purgeable",
"regeneratekey",
"rotationpolicy",
"rsaaeskeywrap",
"rsaes",
Expand All @@ -35,8 +46,12 @@
"secg",
"secp",
"setissuers",
"setrotationpolicy",
"setsas",
"subid",
"unwrapkey",
"upns",
"wrapkey"
"vnet",
"wrapkey",
]
}
50 changes: 50 additions & 0 deletions sdk/keyvault/.dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
byok
canonicalizes
cbcpad
ciphertext
ckmaeskeywrap
ckmaeskeywrappad
ckmrsaaeskeywrap
deletedcertificates
deleteissuers
deletedkeys
deletedsecrets
deletesas
diffie
eastus
echsm
ekus
fips
getissuers
getrotationpolicy
getsas
innererror
keyout
listissuers
listsas
managecontacts
manageissuers
mhsm
mhsmip
newkey
oaep
preprovisioning
purgeable
regeneratekey
rotationpolicy
rsaaeskeywrap
rsaes
rsahsm
rsaoaep
rsassa
rsnull
secg
secp
setissuers
setrotationpolicy
setsas
subid
unwrapkey
upns
vnet
wrapkey
26 changes: 26 additions & 0 deletions sdk/keyvault/azure_resourcemanager_keyvault/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "azure_resourcemanager_keyvault"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

[features]
default = ["azure_core/default"]

[dependencies]
async-trait = { workspace = true }
azure_core = { workspace = true }
serde = { workspace = true }

[dev-dependencies]
azure_core_test = { workspace = true, features = [
"tracing",
] }
azure_core_test_macros = { workspace = true }
azure_identity = { workspace = true }
futures = { workspace = true }
include-file = { workspace = true }
tokio = { workspace = true }
Loading
Loading