我有现有的terraform基础设施,这是在我之前有人创建的,他们使用计数创建了实例,我们想要删除计数,但terraform想要重建实例。 有没有一种方法可以在不重建实例的情况下删除计数? 我想知道像terraform state mv这样的东西是否能够实现这一点,或者其他东西是否可能。 提前感谢! 更新:示例如下 # module.compute.aws_kms_alias.kms-alias will be created
+ resource "aws_kms_alias" "kms-alias" {
+ arn
在尝试最初计划或应用资源时,我会收到以下错误,该资源正在使用AWS环境中的数据值进行计数。
$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
---------------------------------------------------------------
我正在尝试运行terraform命令来获取一个特定的模块,该模块是为每个模块创建的。下面是执行terraform计划的示例命令
terraform plan -target=module.virtualmachinescaleset.azurerm_linux_virtual_machine_scale_set.this["x"]
我继续得到以下错误索引括号必须包含一个文字数字或一个文字字符串
我有一个terraform模块,我在azure中创建了3个服务器,在var文件中,我指定了从此模块创建的服务器的instance type,现在我想更改其中一个服务器的实例类型,有没有一种terraform方法可以实现这一点,或者我是否应该手动升级实例类型,然后仅对该特定服务器使用terraform state mv,我不确定,state mv是否也采用size参数?在这方面的任何帮助都将不胜感激,
terraform plan -target=module.serverset.azurerm_linux_virtual_machine.new_vm[2]"
在上面一行中,我只是针对特
更具体地说,adjustment_type不断(似乎)在每个terraform plan上得到更新。为什么要这样做,可以避免呢?
Terraform will perform the following actions:
# aws_autoscaling_policy.this will be updated in-place
~ resource "aws_autoscaling_policy" "this" {
+ adjustment_type = "ChangeInCapacity"
下面是自动
Terraform v0.12.17 我只有两个简单的文件 snapshot_id.tf = gets a list of my completed EBS volume snapshot ids
data "aws_ebs_snapshot_ids" "jenkins_master" {
filter {
name = "tag:Name"
values = ["jenkins-master"]
}
filter {
name = "status"
value
我有亚马逊网络服务clientVPN,它是从亚马逊网络服务控制台手动创建的,它有大约20多个路由表条目。现在,我想要对此进行terraform,这样我们就可以使用terraform添加任何新的路由。 我已经使用terraform导入导入了ClientVPN信息。要导入所有现有路由,我可以一次导入一条路由,对于每个路由导入,我需要在main.tf中添加资源条目,如下所示: Command used to import the route table entry:
$ terraform import aws_ec2_client_vpn_route.example cvpn-endpoint-
我刚接触terraform,已经玩了一段时间了。在我尝试执行的场景中,我尝试为我的每个部署创建一个堆栈。我能够创建我需要的资源。然而,当我想要部署一个新的堆栈时,它会试图销毁已经存在的堆栈。我尝试使用生命周期密钥来防止销毁,但是抛出了一个错误,指出资源不能被删除。
the plan would destroy this resource, but it currently has lifecycle.prevent_destroy set to true. To avoid this error and continue with the plan, either disable lifecy
尝试运行terraform plan.I时出现以下错误。我正在terraform云上运行terraform,并且已设置了var文件
Error: No value for required variable
on _inputs.tf line 130:
130: variable "mc-q" {
The root module input variable "mq-c" is not set,
and has no default value. Use a -var or -var-file
command line argument t
在我正在帮助恢复的项目上,一些用户报告说在使用Xcode4编译时出现了 (我目前使用的是Xcode3.6.8,目前还不能接触到新的Xcode3.6.8):看起来有些库依赖于他们自己。
这是他们得到的信息:
File /Users/username/Library/Developer/Xcode/DerivedData/iSoul-ervmuugfdxbpmohhmtpcemztfvyw/Build/Products/Release/libevent.framework depends on itself. This target might include its own product.
我正在写一个在oracle cloud中创建kubernetes集群的脚本。当我运行terraform plan时,它没有返回任何错误。但是当我运行terraform apply时,它返回错误:
Error: Invalid template interpolation value: Cannot include the given value in a string template: string required.
我启用了跟踪和日志文件生成,以尝试确定问题所在,在跟踪中它返回:
2019/11/21 20:31:15 [TRACE] EvalMaybeTainted: null_res