Azure Cosmos DB帐户已存在

编程入门 行业动态 更新时间:2024-10-19 04:21:54
本文介绍了Azure Cosmos DB帐户已存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试使用terraform脚本在Azure中构建一个基础架构。它由k8s,API网关,子网,Cosmos数据库,SQL服务器等组成。 $

I m trying to use the terraform scripts to build one infrastructure in Azure. It consists of k8s, API gateway,subnet,Cosmos db ,SQL server etc..

我正在应用该计划并破坏计划(terraform步骤) )。当我第一次建造一切都很好,破坏也很好。但是,当我第二次建立时,我得到低于两个错误

I m applying the plan and also destroying the plan (terraform steps). When first time i m building everything builds fine and destroying also works fine. But when i m building second time i get below two error

错误:

* azurerm_cosmosdb_account.XXXXXX:1错误( s)发生: * azurerm_cosmosdb_account.XXXXXX:CosmosDB帐户XXXXXX已经存在,请通过terraform import导入资源 * azurerm_sql_server.YYYYYY:发生1个错误: * azurerm_sql_server.YYYYYY:等待SQL Server"YYYYYY"的创建/更新未来时出错(资源组"mygroup"):Code =" NameAlreadyExists" Message ="名称'YYYYYY'已经存在。选择一个不同的名称。"

但是当检查我的资源组时,我找不到cosmosDB帐户( XXXXXX )和SQL服务器( YYYYYY )。我不确定这些名字是如何得到验证的。我使用az cosmosdb delete和az sql server delete来删除这些资源。执行删除cli命令后,我尝试构建terraform脚本仍然是我得到XXXXXX和YYYYYY已经存在。每次我们应该创建和销毁这些资源时,这是一个devops脚本。但是,如果我面对这个问题,那么我每次都应该更改cosmodb帐户名和sql server名称,而不是自动化。

But when check my resource group i cant find cosmosDB account (XXXXXX ) and SQL server(YYYYYY) . I m not sure how these names have been verified. I used az cosmosdb delete and az sql server delete explicitly to delete these resources. After executing the delete cli commands , I tried to build the terraform scripts still i get XXXXXX and YYYYYY already exists. This is an devops scripts each time we should create and destroy these resources. But if i face this issue, then each and every time i should change the cosmodb account name and sql server name which is not automation at all.

你能不能帮帮我吧用这个?

Could you please help me with this?

注意: XXXXXX和 YYYYYY是公司,项目和一些非常独特的数字组合的复杂名称。

谢谢,

Swathi S

Swathi S

推荐答案

Hello Swathi

Hello Swathi

再次删除和重新配置它们之间的持续时间是多长?

What is the time duration between deleting and reprovisioning them again?

结构可能需要一段时间才能完全解除后端资源的分配。

It could take a while for the fabric to completely de-allocate the resources in the backend.

更多推荐

Azure Cosmos DB帐户已存在

本文发布于:2023-11-17 02:26:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1608475.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:帐户   Azure   Cosmos   DB

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!