i have a terraform code in main.tf and outputs.tf and i have an error about key vault, this section is available on my azure dashboard :
module.virtual_machine.azurerm_key_vault_secret.client_credentials_login: Still creating... [6m20s elapsed]
module.virtual_machine.azurerm_key_vault_secret.client_credentials_password: Still creating... [6m20s elapsed]
│ Error: checking for presence of existing Secret "toto-login" (Key Vault "https://kvapplitest2sbx.vault.azure.net/"): autorest/Client#Do: Preparing request failed: StatusCode=0 -- Original Error: Get "https://kvapplitest2sbx.vault.azure.net/secrets/toto-login/?api-version=7.4": dial tcp: lookup kvapplitest2sbx.vault.azure.net: no such host
│
│ with module.virtual_machine.azurerm_key_vault_secret.client_credentials_login,
│ on ..\..\modules\virtual_machine\14_keyvault.tf line 13, in resource "azurerm_key_vault_secret" "client_credentials_login":
│ 13: resource "azurerm_key_vault_secret" "client_credentials_login" {
│
my file of terraform main.tf is :
terraform {
required_version = ">= 1.0.0"
}
provider "azurerm" {
skip_provider_registration = true
features {}
}
provider "azurerm" {
skip_provider_registration = true
alias = "gallery"
subscription_id = sort(data.azurerm_subscriptions.osfactory.subscriptions.*.subscription_id)[0]
features {}
}
data "azurerm_subscriptions" "osfactory" {
display_name_prefix = "Suez IT OSFactory"
}
data "azurerm_resource_group" "cloud_bundle_rg" {
name = "rg-applitest2-sbx" # To be updated
}
module "virtual_machine" {
source = "../../modules/virtual_machine"
providers = {
azurerm.gallery = azurerm.gallery
}
cloudbundle_info = data.azurerm_resource_group.cloud_bundle_rg
index = 123
size = "Standard_D2s_v3"
os_disk_type = "Standard_LRS"
role = "example"
ad_domain = "green.local"
os = {
type = "Windows"
version = "2022"
}
}
my file outputs.tf is :
output "virtual_machine_outputs" {
value = module.virtual_machine
description = "Virtual machine outputs."
}
can you tell me why there are an error please,