热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Pleaseaddaflagtoaws_ebs_volumeresourcetopreventdeletionontermination

Hithere,TerraformVersion

Hi there,

Terraform Version

1
2
Terraform v0.10.6

provider.aws: version = "~> 1.3"


Affected Resource(s)


  • aws_ebs_volume

Terraform Configuration Files

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
hcl

resource "aws_ebs_volume" "ebs_master-eu-west-1a" {

  availability_zone = "eu-west-1a"

  size              = 100

  type              = "gp2"

  encrypted         = false

  tags {

    Name = "ebs_master-eu-west-1a"

  }

}



resource "aws_volume_attachment" "ebs_master-eu-west-1a" {

  device_name  = "/dev/sdc"

  skip_destroy = true

  volume_id    = "${aws_ebs_volume.ebs_master-eu-west-1a.id}"

  instance_id  = "${aws_instance.master-eu-west-1a.id}"

}


Expected Behavior

If you use the 'block_device' mapping within the aws_instance resource definition you can prevent it from being destroyed upon termination:

https://www.terraform.io/docs/providers/aws/r/instance.html#delete_on_termination-1

But this does option not appear in the ebs_volume resource:

https://www.terraform.io/docs/providers/aws/r/ebs_volume.html

Please can this flag also be added to the

1
aws_ebs_volume

resource?

Actual Behavior

Volume is destroyed/deleted

Steps to Reproduce



  1. 1
    terraform destroy


该提问来源于开源项目:hashicorp/terraform-provider-aws

Totally agree with .
Extremely necessary.





   



推荐阅读
author-avatar
Rac__hel黄蓉
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有