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

improve validation for azapi_resource data source #699

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

ms-henglu
Copy link
Member

Tests:

data "azapi_resource" "rg" {
  type = "Microsoft.Resources/resourceGroups@2024-03-01"
  name = "myRG"
}

data "azapi_resource" "subscription" {
  type = "Microsoft.Resources/subscriptions@2024-03-01"
}

data "azapi_resource" "vnet" {
  type      = "Microsoft.Network/virtualNetworks@2024-03-01"
  name      = "myVnet"
  parent_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG"
}

data "azapi_resource" "vnet2" {
  type        = "Microsoft.Network/virtualNetworks@2024-03-01"
  resource_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/myVnet"
}


# Success! The configuration is valid, but there were some validation warnings as shown above.

@ms-henglu ms-henglu requested a review from magodo December 23, 2024 05:40
@ms-henglu ms-henglu merged commit 39b6089 into main Dec 23, 2024
12 checks passed
@ms-henglu ms-henglu deleted the branch-241223-improve-data-source-validation branch December 23, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants