我正在尝试使用 terraform 创建 elasticsearch 集群,但出现此错误
11:58:07 * aws_cloudwatch_log_resource_policy.elasticsearch-log-publishing-policy: Writing CloudWatch log resource policy failed: LimitExceededException: Resource limit exceeded.
11:58:07 * aws_elasticsearch_domain.es2: 1 error(s) occurred:
Run Code Online (Sandbox Code Playgroud)
我一开始以为这个资源限制错误是无法创建日志组。但是当我向 AWS 团队提出问题时,他们说“IAD 中此帐户的 CreateLogGroup API 没有限制”
ElasticSearch 大约有 10 个集群正在运行。我不确定超出了哪个资源限制。
有人可以解释一下上面的错误吗?
更新:
data "aws_iam_policy_document" "elasticsearch-log-publishing-policy" {
statement {
actions = [
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:PutLogEventsBatch",
]
resources = ["arn:aws:logs:*"]
principals {
identifiers = ["es.amazonaws.com"]
type = "Service"
}
}
}
resource "aws_cloudwatch_log_resource_policy" "elasticsearch-log-publishing-policy" {
policy_document = "${data.aws_iam_policy_document.elasticsearch-log-publishing-policy.json}"
policy_name = "elasticsearch-log-publishing-policy"
}
Run Code Online (Sandbox Code Playgroud)
我尝试使用 terraform 目标应用此操作,我认为错误就在这里,AWS 对我们创建的自定义策略数量是否有限制,我找不到请求增加的选项。
我正在开发 terraform rds 集群来构建 aurora,有人可以帮助我如何将 aws 提供程序版本固定到 2.0 吗?
这是正确的方法吗?
provider "aws" {
region = "us-east-1"
version = "<= 2.0"
}
Run Code Online (Sandbox Code Playgroud)
另外,我的模块之前使用的是 2.46 版本,我在尝试降级时是否应该遵循任何步骤?
使用terraform 0.12.6版本
我有一个名为 group-dev 的 IAM 组,并且有几个用户附加到该组,我有自定义 IAM 策略(如下)。仅此 IAM 策略是否足以让该组中的用户加密和列出 kms 密钥?
\n基本上我的目标是创建 IAM 组,并将策略附加到几个用户,当添加新用户时,我不想做双重工作,例如将它们添加到组中,然后将它们添加到 kms 密钥策略中。那么它适用于以下政策吗?
\nIAM 组内联策略
\n{\n "Action": [\n "kms:List*",\n "kms:Encrypt",\n "kms:Decrypt",\n "kms:Describe*",\n "kms:Get*"\n ],\n "Effect": "Allow",\n "Resource": "*"\n },\n\nkms policy \n\n\n{\n "Id": "key-consolepolicy",\n "Version": "2012-10-17",\n "Statement": [\n {\n "Sid": "Enable IAM User Permissions",\n "Effect": "Allow",\n "Principal": {\n "AWS": "arn:aws:iam::xxxxxxxxxx:root"\n },\n "Action": "kms:*",\n "Resource": "*"\n }\nRun Code Online (Sandbox Code Playgroud)\n以下是 aws 文档的片段:https ://docs.amazonaws.cn/en_us/kms/latest/developerguide/kms-dg.pdf#page=95&zoom=100,96,105
\nAllowing multiple IAM users to access a CMK\nIAM groups are not valid …Run Code Online (Sandbox Code Playgroud) 嗨如何为下面的日志写一个grok表达式
[2017-03-25T00:00:07,137][WARN ]
match => { "message" => "\[%{TIMESTAMP_ISO8601:timestamp}/]/[%{LOGLEVEL:log-level}\s*\]" }
Run Code Online (Sandbox Code Playgroud)
这是正确的,如何在grok中写空间?谢谢
我是 terraform 的新手,当我尝试运行 terraform plan 时,我收到发送请求失败的消息。我该如何解决这个问题?
* RequestError: send request failed
caused by: Post https://sts.amazonaws.com/: x509: certificate signed by unknown authority
Terraform v0.8.7
Run Code Online (Sandbox Code Playgroud) 我是terraform的新手,创建了3个ec2实例,并创建了6个ebs卷.我们如何将3个ebs卷附加到三个实例中的每一个?
#Create 6 EBS volumes and attach 2 per instance.
resource "aws_ebs_volume" "vertica_ebs" {
count = "6"
availability_zone = "${var.availability_zone}"
size = "500"
type = "st1"
}
}
#Attach ebs volume
resource "aws_volume_attachment" "ebs_att" {
count = "6"
volume {
device_name = "/dev/sdf"
volume_id = "[${element(aws_ebs_volume.vertica_ebs.*.id, count.index)}]"
}
volume{
device_name = "/dev/sdg"
volume_id = "[${element(aws_ebs_volume.vertica_ebs.*.id, count.index)}]"
}
instance_id = "[${element(aws_instance.vertica1.*.id,count.index)}]"
}
Run Code Online (Sandbox Code Playgroud)
错误:
如何写一个ansible任务来检查物理内存> = 128 MB和可用磁盘是否> = 256 MB.我试图得到输出,但我不知道如何进一步.
# Check the physical disk memory 128 MB and free disk 256 MB
- name: check the physical memory
command: vmstat -s
register: phy_mem
Run Code Online (Sandbox Code Playgroud) 我有9个服务器,我正在尝试使用ansible安装一个软件包,我可以使用密码ssh到5个服务器,而其他4个ssh'ng进入它们时不会询问任何密码.
但是我已经将id_rsa.pub密钥复制到所有9台服务器上.
现在ansible脚本正常工作5服务器但是剩下的4我收到以下错误消息.
致命:[xxx0?]:失败了!=> {"已更改":false,"failed":true,"module_stderr":"连接到xxx0?已关闭.\ r \n","module_stdout":"sudo:需要密码\ r \n"," msg":"MODULE FAILURE","rc":1}
我的Ansible.cfg
[defaults]
filter_plugins =./filter_plugins
roles_path = ./roles
sudo_user = root
host_key_checking = False
retry_files_enabled = False
password = ~/password.txt
timeout = 25
[ssh_connection]
ssh_args = -F ~/.ssh/config -o ControlMaster=no -o ControlPersist=30m
control_path = ~/.ssh/ansible-%%r@%%h:%%p
Run Code Online (Sandbox Code Playgroud)
的〜/ .ssh /配置
Host xx0? xx0? xx0? xx0? xx0? xx0? xx0? xx0? xx0? .xyz.com
User yyy
Port 22
Run Code Online (Sandbox Code Playgroud)
ansible version = ansible 2.3.1.0
我该如何解决这个错误?
我有 3 次提交,我想在重新设置为 1 时跳过一次提交 -2 说
commit -1
commit -2
commit -3
Run Code Online (Sandbox Code Playgroud)
我做了 git rebase -i HEAD~3
pick commit -1
pick commit -2
squash commit -3
Run Code Online (Sandbox Code Playgroud)
我试过这样(删除了选择提交 -2)但是从 git log 中删除了提交 -2 本身:(
git rebase -i HEAD~3
pick commit -1
squash commit -3
Run Code Online (Sandbox Code Playgroud)
有人请帮助我如何仅使用命令压缩提交 1 和提交 3。
我有一个时间戳2017-07-19 11:45:01,我希望它转换为 int。
询问:
select cast(max(event_timestamp) as INT) from error_messages where error_level='ERROR' and user_name='git'
Run Code Online (Sandbox Code Playgroud)
错误:
SQL Error [2366] [42846]: [Vertica][VJDBC](2366) ERROR: Cannot cast type timestamptz to int
[Vertica][VJDBC](2366) ERROR: Cannot cast type timestamptz to int
com.vertica.util.ServerException: [Vertica][VJDBC](2366) ERROR: Cannot cast type timestamptz to int
Run Code Online (Sandbox Code Playgroud) terraform ×4
ansible ×2
ansible-2.x ×2
amazon-iam ×1
amazon-kms ×1
git ×1
linux ×1
sql ×1
vertica ×1