Skip to content

Commit

Permalink
Merge pull request #279 from bbmilan/azure-cognitive-deployment-name
Browse files Browse the repository at this point in the history
  • Loading branch information
Nepomuceno authored Apr 10, 2024
2 parents bbd26cc + 00a32ce commit 1a5a959
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 2 deletions.
3 changes: 2 additions & 1 deletion azurecaf/models_generated.go

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

24 changes: 24 additions & 0 deletions examples/.terraform.lock.hcl

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

2 changes: 1 addition & 1 deletion examples/cafrandom.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurecaf = {
source = "aztfmod/azurecaf"
version = "1.2.4"
version = "1.2.28"
}
}
}
Expand Down
15 changes: 15 additions & 0 deletions examples/resource_name.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ output "azurerm_cognitive_account" {
description = "Random result based on the resource type"
}

#Azure Open AI Deployment test
resource "azurecaf_name" "azurerm_cognitive_deployment" {
name = "openai-deployment"
resource_type = "azurerm_cognitive_deployment"
prefixes = ["a", "b"]
suffixes = ["y", "z"]
random_length = 5
clean_input = true
}

output "azurerm_cognitive_deployment" {
value = azurecaf_name.azurerm_cognitive_deployment.result
description = "Random result based on the resource type"
}

resource "azurecaf_name" "multiple_resources" {
name = "cogsdemo2"
resource_type = "azurerm_cognitive_account"
Expand Down
11 changes: 11 additions & 0 deletions resourceDefinition.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
[
{
"name": "azurerm_cognitive_deployment",
"min_length": 2,
"max_length": 64,
"validation_regex": "\"^[a-zA-Z0-9][a-zA-Z0-9-]{0,63}$\"",
"scope": "resourceGroup",
"slug": "cog",
"dashes": true,
"lowercase": false,
"regex": "\"[^0-9A-Za-z-]\""
},
{
"name": "azurerm_aadb2c_directory",
"min_length": 1,
Expand Down

0 comments on commit 1a5a959

Please sign in to comment.