- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经使用terraform将ELK堆栈部署到了AWS ECS。几周来,所有程序都运行良好,但是2天前,我不得不重新启动实例。
令人遗憾的是,新实例不依赖现有卷来安装根块设备。因此,我的所有Elasticsearch数据都不再对我的Kibana实例可用。
上一卷中的数据仍在此处,当前未使用。
因此,我尝试了很多事情来使该卷挂载在“dev/xvda”上,但没有一个示例:
resource "aws_launch_configuration" "XXX" {
name = "XXX"
image_id = data.aws_ami.latest_ecs.id
instance_type = var.INSTANCE_TYPE
security_groups = [var.SECURITY_GROUP_ID]
associate_public_ip_address = true
iam_instance_profile = "XXXXXX"
spot_price = "0.04"
lifecycle {
create_before_destroy = true
}
user_data = templatefile("${path.module}/ecs_agent_conf_options.tmpl",
{
cluster_name = aws_ecs_cluster.XXX.name
}
)
//The volume i want to reuse was created with this configuration. I though it would
//be enough to reuse the same volume. It doesn't.
root_block_device {
delete_on_termination = false
volume_size = 50
volume_type = "gp2"
}
}
resource "aws_autoscaling_group" "YYY" {
name = "YYY"
min_size = var.MIN_INSTANCES
max_size = var.MAX_INSTANCES
desired_capacity = var.DESIRED_CAPACITY
health_check_type = "EC2"
availability_zones = ["eu-west-3b"]
launch_configuration = aws_launch_configuration.XXX.name
vpc_zone_identifier = [
var.SUBNET_1_ID,
var.SUBNET_2_ID]
}
我是否会错过一些显而易见的事情?
最佳答案
遗憾的是,您无法将卷作为根卷附加到实例。
您要做的是根据您的音量创建一个自定义AMI 。这涉及创建卷的快照,然后构造AMI:
provider "aws" {
# your data
}
resource "aws_ebs_snapshot" "snapshot" {
volume_id = "vol-0ff4363a40eb3357c" # <-- your EBS volume ID
}
resource "aws_ami" "my" {
name = "my-custom-ami"
virtualization_type = "hvm"
root_device_name = "/dev/xvda"
ebs_block_device {
device_name = "/dev/xvda"
snapshot_id = aws_ebs_snapshot.snapshot.id
volume_type = "gp2"
}
}
resource "aws_instance" "web" {
ami = aws_ami.my.id
instance_type = "t2.micro"
# key_name = "<your-key-name>"
tags = {
Name = "InstanceFromCustomAMI"
}
}
关于amazon-web-services - Terraform AWS : Couldn't reuse previously created root_block_device with AWS EC2 instance launched with aws_launch_configuration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63205968/
用于获取所有季度中每个 ID 的 MAX 先前分数的最佳方法。 给定: ID QTR SCORE 21 1 3 21 2 5 21 3 3
我的应用程序包含照片,用户可以搜索符合特定条件的照片。假设某个用户通过标签搜索照片,我们得到如下信息: @results = Photo.tagged_with('mountain') 现在,@res
该表称为 imposto。 +------------------+------------+------+-----+---------+-------+ | Field |
我在这里不知所措。我觉得我已经尝试了所有的方法,并使用了其他帖子/教程中解释的确切方法。我知道您需要使用光标并设置第一个和最后一个可见文档,以便在向前移动的情况下从最后一个文档开始,在向后移动的情况下
Bootstrap容器横向有两种形式。将鼠标悬停在 Form1 上将增加宽度并减少 form2 的宽度。但逆转并没有发生。请提出任何建议。 Bootstrap Example
所以我刚读到我可以定位 previous sibling elements使用 :has(+ ) 伪类。 我去执行了以下规则。不幸的是,这是行不通的。我在祈祷什么吗? p { margin: 2r
我正在制作图像轮播 看我的 fiddle :https://jsfiddle.net/gd2n6paw/8/ 我是 jquery 新手,只是想知道我们如何制作轮播“下一个”和“上一个”控件,感谢您的帮
示例数据: library(dplyr) x % arrange(name,timestamp) 我想找到数据帧 anti_join(y,x) 中每个连续 block (使用 timestam
我尝试了hadoop-1.0.3以及1.0.4。两者都在伪集群模式下。 我的理解是,previous.checkpoint目录应该在由“fs.checkpoint.dir”指定的辅助名称节点下创建吗?
我有一个 MS SQL 表,其中包含具有以下列的股票数据:Id、Symbol、Date、Open、High、Low、Close。 我想自行加入该表,这样我就可以获得关闭的每日百分比变化。 我必须创建一
我正在使用 Selenium IDE 为我的网站编写测试,但我在让 selenium 使用 previous-sibling 单击按钮时遇到了问题 Arcade Reader 我
我有这个脚本: $('#ap').click(function() { $('#content-container').html($('#alertpay').html()); retu
这个问题已经有答案了: how to judge an element's previous or next element exist with jquery? (4 个回答) 已关闭 7 年前。
有没有办法改变浏览器中“上一个”按钮的位置? 问题如下: 用户进入页面 用户点击缩略图 大图像出现在弹出窗口(灯箱)和 URL 更改 来自 http://example.com/至 http://ex
我试图了解回调在这种情况下的工作原理。 例如给定这段代码: var images = jQuery.map((1234567 + '').split(''), function(n) { retu
我似乎无法按照我想要的方式滚动浏览我的 ResultSet : public void getCurves(String runId, File file, Connection conn) {
嗨,我正在使用 jquery mobile,这是代码 parisfrance generique code:24
使用 Apache Commons Collections,我找到了 OrderedMapIterator 接口(interface),可以在 OrderedMap 中来回导航。迭代到下一个条目按预期
我在mysql查询中使用这些代码 select c1.date,sum(SELECT IFNULL(cx.purchase-cx.sold,0))+MAX(p.openqty) as open
我正在尝试从数据库中获取上一张图像,其中图像按 ID 号列出。经过一番研究后,我遇到了这个查询,它应该提供之前的结果。然而它并没有这样做。相反,它提供小于当前 ID 号的第一个结果。 (代码格式为 P
我是一名优秀的程序员,十分优秀!