我正在使用 terraform 生成证书。寻找有关如何使用 terrafrom 将 pem 和 cert 值转储到磁盘文件的信息。这是输出变量。我想将它们转储到变量中。任何参考代码片段?
output "private_key" {
description = "The venafi private key"
value = venafi_certificate.this.private_key_pem
}
output "certificate_body" {
description = "The acm certificate body"
value = venafi_certificate.this.certificate
}
output "certificate_chain" {
description = "The acm certificate chain"
value = venafi_certificate.this.chain
}
'''
Run Code Online (Sandbox Code Playgroud) 我正在使用 terraform 创建 rds 服务器。我使用列表变量传递选项组。选项将变量分组在variable.tf中,如下所示
options = [
{
option_name = "SQLSERVER_BACKUP_RESTORE"
option_settings=[
{
name = "IAM_ROLE_ARN"
value = "${role_arn}"
},
]
},
Run Code Online (Sandbox Code Playgroud)
我想替换 main.tf 中的“${role_arn}”变量。任何人都可以帮助解决语法问题吗?
我有一个使用 Windows 身份验证的 ASP .NET WCF 服务 Web。将 Web 服务部署到服务器 (Windows Server 2012) 并在 IIS 上启用 Windows 身份验证后,我使用 localhost 直接访问服务器的页面。它提示输入凭据,我提供一次 AD 用户名/密码,它就可以工作。
现在,如果我在 AWS 应用程序负载均衡器后面有相同的服务器,并且我访问了映射到应用程序负载均衡器的 Web 服务的 DNS,那么就会注意到这里存在问题。
将弹出用于输入 Windows 凭据的窗口。但是当我输入正确的凭据时,它不会接受它们。反复提示输入用户名/密码?发生了什么?ALB 不支持 IIS 的 AD 集成身份验证?
有任何想法吗?
windows-authentication amazon-web-services iis-7.5 aws-alb aws-application-load-balancer
我正在尝试使用以下 terraform 资源模块创建一个简单的 dynamodb 表。
运行 terraform 时出现以下错误: 必须对所有属性建立索引。未使用的属性:[“pactitle”“ipadress”“Timestamp”]。 为什么我们需要索引所有属性?如何解决这个问题?
resource "aws_dynamodb_table" "this" {
count = var.create_table ? 1 : 0
name = var.name
billing_mode = var.billing_mode
hash_key = var.hash_key
range_key = var.range_key
read_capacity = var.read_capacity
write_capacity = var.write_capacity
//stream_enabled = var.stream_enabled
//stream_view_type = var.stream_view_type
dynamic "attribute" {
for_each = var.attributes
content {
name = attribute.value.name
type = attribute.value.type
}
}
server_side_encryption {
enabled = var.server_side_encryption_enabled
kms_key_arn = var.server_side_encryption_kms_key_arn
}
tags = merge(
var.tags,
{
"Name" = format("%s", var.name)
}, …Run Code Online (Sandbox Code Playgroud) 我正在编写一个 ec2 调度程序逻辑来启动和停止 ec2 实例。lambda 用于停止实例。但是,启动函数并未启动 ec2 start。逻辑是根据 ec2 的标签和状态进行过滤,并根据当前状态启动或停止。
以下是启动 EC2 实例的代码片段。但这并没有启动实例。过滤正确发生并将实例推送到“stopParams”对象。
如果我通过过滤运行状态实例将逻辑更改为 ec2.stopInsatnces,则相同的代码将起作用。该角色具有启动和停止的权限。
有什么想法为什么它不触发启动吗?
if (instances.length > 0){
var stopParams = { InstanceIds: instances };
ec2.startInstances(stopParams, function(err,data) {
if (err) {
console.log(err, err.stack);
} else {
console.log(data);
}
context.done(err,data);
});
Run Code Online (Sandbox Code Playgroud) terraform ×3
amazon-ec2 ×1
amazon-rds ×1
aws-alb ×1
aws-application-load-balancer ×1
aws-lambda ×1
iis-7.5 ×1
node.js ×1