小编sle*_*epy的帖子

使用 Terraform 创建 Azure 资源时出错

我正在尝试从 Azure 网站 CLI 创建 Azure 资源,但奇怪的是,它在运行“terraform apply”后抛出以下错误。以前不是这样的。

Error: A resource with the ID "/subscriptions/certdab-as441-4a670-bsda-2456437/resourceGroups/commapi" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_resource_group" for more information.

  on terra.tf line 14, in resource "azurerm_resource_group" "rg1":
  14: resource "azurerm_resource_group" "rg1" {
Run Code Online (Sandbox Code Playgroud)

Terraform 代码如下;

provider "azurerm" {
  version = "=2.20.0"
  features {}
  subscription_id = "c413asdasdasdadsasda1c77"
  tenant_id       = "da956asdasdadsadsasd25a535"
}

resource "azurerm_resource_group" "rg" {
  name     = "commapi"
  location …
Run Code Online (Sandbox Code Playgroud)

azure terraform

6
推荐指数
1
解决办法
2万
查看次数

如何在 Ubuntu 上运行 Kotlin?

我刚刚使用以下命令在 Ubuntu 上安装了 Kotlin,

curl -s https://get.sdkman.io | bash
sdk install kotlin
Run Code Online (Sandbox Code Playgroud)

它安装了以下几行,

Downloading: kotlin 1.3.61

In progress...

######################################################################################################## 100.0%

Installing: kotlin 1.3.61
Done installing!
*************************************************************
Run Code Online (Sandbox Code Playgroud)

但是当我尝试执行文件时,它不起作用。

comp@ubuntu:~$ kotlin --version
/home/comp/.sdkman/candidates/kotlin/current/bin/kotlinc: line 80: java: command not found

comp@ubuntu:~$ chmod +x test.kt 
comp@ubuntu:~$ kotlinc test.kt -include-runtime -d hello.jar
/home/comp/.sdkman/candidates/kotlin/current/bin/kotlinc: line 80: java: command not found

comp@ubuntu:~$ which kotlinc
/home/comp/.sdkman/candidates/kotlin/current/bin/kotlinc
Run Code Online (Sandbox Code Playgroud)

文件“/home/comp/.sdkman/candidates/kotlin/current/bin/kotlinc”的第80行如下,

"${JAVACMD:=java}" $JAVA_OPTS "${java_args[@]}" -cp "${kotlin_app[@]}" "${kotlin_args[@]}"
Run Code Online (Sandbox Code Playgroud)

可能是什么问题?某些 Java 组件有问题?谢谢。

linux ubuntu kotlin

4
推荐指数
2
解决办法
1887
查看次数

标签 统计

azure ×1

kotlin ×1

linux ×1

terraform ×1

ubuntu ×1