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

Updates azure.yaml schema for deployment stacks configuration #4358

Merged
merged 4 commits into from
Oct 9, 2024
Merged
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
1 change: 1 addition & 0 deletions .vscode/cspell.global.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ ignoreWords:
- tfstate
- tfvars
- traf
- unmanage
- useragent
- versioncontrol
- vmss
Expand Down
1 change: 1 addition & 0 deletions .vscode/cspell.misc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ overrides:
- azdev
- myimage
- azureai
- entra
111 changes: 109 additions & 2 deletions schemas/alpha/azure.yaml.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"type": "object",
"title": "The infrastructure configuration used for the application",
"description": "Optional. Provides additional configuration for Azure infrastructure provisioning.",
"additionalProperties": true,
"additionalProperties": false,
"required": [
"provider"
],
"properties": {
"provider": {
"type": "string",
Expand All @@ -55,8 +58,29 @@
"type": "string",
"title": "Name of the default module within the Azure provisioning templates",
"description": "Optional. The name of the Azure provisioning module used when provisioning resources. (Default: main)"
},
"deploymentStacks": {
"$ref": "#/definitions/deploymentStacksConfig"
}
}
},
"allOf": [
{
"if": {
"not": {
"properties": {
"provider": {
"const": "bicep"
}
}
}
},
"then": {
"properties": {
"deploymentStacks": false
}
}
}
]
},
"services": {
"type": "object",
Expand Down Expand Up @@ -1047,6 +1071,89 @@
"required": [
"deployment"
]
},
"deploymentStacksConfig": {
"type": "object",
"title": "The deployment stack configuration used for the project.",
"additionalProperties": false,
"oneOf": [
wbreza marked this conversation as resolved.
Show resolved Hide resolved
{
"required": [
"actionOnUnmanage"
]
},
{
"required": [
"denySettings"
]
}
],
"properties": {
"actionOnUnmanage": {
"type": "object",
"title": "The action to take when when resources become unmanaged",
"description": "Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. Defaults to 'delete' for all resource scopes.",
"required": [
"resourceGroups",
"resources"
],
"properties": {
"resourceGroups": {
"type": "string",
"title": "Required. The action on unmanage setting for resource groups",
"description": "Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state.",
"default": "delete",
"enum": [
"delete",
"detach"
]
},
"resources": {
"type": "string",
"title": "Required. The action on unmanage setting for resources",
"description": "Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state.",
"default": "delete",
"enum": [
"delete",
"detach"
]
}
}
},
"denySettings": {
"type": "object",
"title": "The deny settings for the deployment stack",
"description": "Defines how resources deployed by the stack are locked. Defaults to 'none'.",
"required": [
"mode"
],
"properties": {
"mode": {
"type": "string",
"title": "Required. Mode that defines denied actions.",
"default": "none",
"enum": [
"none",
"denyDelete",
"denyWriteAndDelete"
]
},
"applyToChildScopes": {
"type": "boolean",
"title": "Whether the deny settings apply to child scopes.",
"description": "DenySettings will be applied to child resource scopes of every managed resource with a deny assignment."
},
"excludedActions": {
"type": "array",
"title": "List of role-based management operations that are excluded from the denySettings."
},
"excludedPrincipals": {
"type": "array",
"title": "List of Entra ID principal IDs excluded from the lock. Up to 5 principals are permitted."
}
}
}
}
}
}
}