我以模块化方式使用 Terraform 来构建我的基础设施。我通过使用一个调用不同模块的配置文件来做到这一点。我想传递一个基础设施变量,该变量获取应用程序应构建的 Github 存储库的标记版本。最重要的是,我试图弄清楚如何在配置文件的“source”变量中进行字符串串联。
module "athenaelb" {
source = "${concat("git::https://github.com/ORG/REPONAME.git?ref=",var.infra_version)}"
aws_access_key = "${var.aws_access_key}"
aws_secret_key = "${var.aws_secret_key}"
aws_region = "${var.aws_region}"
availability_zones = "${var.availability_zones}"
subnet_id = "${var.subnet_id}"
security_group = "${var.athenaelb_security_group}"
branch_name = "${var.branch_name}"
env = "${var.env}"
sns_topic = "${var.sns_topic}"
s3_bucket = "${var.elb_s3_bucket}"
athena_elb_sns_topic = "${var.athena_elb_sns_topic}"
infra_version = "${var.infra_version}"
}
Run Code Online (Sandbox Code Playgroud)
我希望它能够编译并且源看起来像这样(例如): git:: https://github.com/ORG/REPONAME.git?ref=v1
有人对如何使这项工作有任何想法吗?
谢谢,凯伦
我刚刚安装了IntelliJ Community Edition.当我尝试导入一个Maven项目时,它会停留在"扫描Maven项目"的步骤上,并将其读作".../pom.xml".它在这里保持大约10分钟,退出此窗口,然后根本不导入项目.
其他一些帖子建议设置/ etc/hosts文件,但我的设置已经设置为127.0.0.1 localhost.我已经在IntelliJ和我的.m2/settings.xml文件中设置了代理信息.
关于如何让IntelliJ打开我的项目的任何建议?
最好,凯伦
我已经看到了一些关于如何从build.sbt读取版本的问题,并且已经提供了很多解决方法来提供如何将build.sbt指向conf/application.conf并且具有指定的版本改为conf/application.conf.
我有一个需要进入版本的Configuration对象.我目前设置如下(如何在play框架和build.sbt中获取应用程序版本),其中来自application.conf的Configuration对象.但是,我仍然希望直接从build.sbt获取它.我怎样才能做到这一点?我是否应该在build.sbt文件上运行bash命令以从那里获取版本?有什么建议?
谢谢!
我有一个长字符串,只要逗号不在方括号或括号内,我想通过用逗号分隔它来将其设置为数组.我尝试了几种变化,但没有得到我正在寻找的东西......
例1:
Harry Potter, Hermione, (Severus, Snape)
Returns:
Harry Potter
Hermione
Severus, Snape
Run Code Online (Sandbox Code Playgroud)
例2:
Harry Potter, [and, the chamber, of secrets], Hermione, (Olivanders, Wands)
Returns:
Harry Potter
and, the chamber, of secrets
Hermione
Olivanders, Wands
Run Code Online (Sandbox Code Playgroud)