首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在配置中指定hashicorp/随机版本?

如何在配置中指定hashicorp/随机版本?
EN

Stack Overflow用户
提问于 2020-11-25 20:06:07
回答 1查看 395关注 0票数 0

当我运行terraform planterraform apply时,输出包括以下内容:

代码语言:javascript
复制
Initializing the backend...

Initializing provider plugins...
- Using previously-installed hashicorp/azurerm v2.36.0
- Using previously-installed hashicorp/random v3.0.0

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, we recommend adding version constraints in a required_providers block
in your configuration, with the constraint strings suggested below.

* hashicorp/random: version = "~> 3.0.0"

如何在我的配置中为hashicorp/随机指定版本?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-11-25 20:09:24

只需在provider块中指定它:

代码语言:javascript
复制
provider "hashicorp/random" {
  version = "~> 3.0.0"
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65011974

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档