Skip to content

Commit 85bcda3

Browse files
committed
add warning for skipping the master key
1 parent 6f05fb0 commit 85bcda3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ The restore command reads a previously created backup file and recreates each su
8989

9090
The philosophy behind restore is idempotent, environment-agnostic replay. A backup taken from one APIM instance can be restored to a different instance (even in a different resource group or Azure subscription). Kura extracts the product ID from the scope stored in the backup and rebuilds the full resource path against the target environment. This makes it suitable for disaster recovery, environment promotion, and infrastructure-as-code workflows where APIM is torn down and recreated.
9191

92+
**⚠️ Warning:** The `master` subscription is a built-in system subscription that cannot be recreated. It is automatically skipped during restore operations and its keys are not restored.
93+
9294
The `--dry-run` flag previews every subscription that would be created or updated without making any changes. This is intended for validation before committing to a restore operation.
9395

9496
| Flag | Short | Required | Description |

cmd/restore.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var restoreCmd = &cobra.Command{
1717
Short: "Restore subscription keys to Azure API Management",
1818
Long: `Restore reads a backup file and restores subscription keys
1919
to an Azure API Management instance.
20-
20+
WARNING: The master subscription key is not restored as it is a built-in system subscription.
2121
Example:
2222
kura restore --resource-group mygroup --apim-name myapim --input backup/mygroup/myapim/subscriptions.json
2323
kura restore -g mygroup -a myapim -i backup/mygroup/myapim/myproduct/subscriptions.json --dry-run`,
@@ -96,6 +96,8 @@ func runRestore(cmd *cobra.Command, args []string) error {
9696
fmt.Printf("Subscription ID: %s\n", restoreSubscription)
9797
}
9898

99+
fmt.Println("\n⚠️ WARNING: The master subscription key is not restored (built-in system subscription)")
100+
99101
if restoreDryRun {
100102
fmt.Println("\nRunning in DRY-RUN mode. No changes will be applied.")
101103
}

0 commit comments

Comments
 (0)