通过在EC2上运行的PowerShells脚本来访问Terraform用户数据变量
我正在努力在Windows AWS EC2上自动化一些软件安装。我作为开发环境和产品环境的基础设施。因此,为了处理我试图通过用户数据的一些变量:
data "template_file" "template_name" {
template = file("user-data/user-data-software.ps1")
vars = {
aws_region = var.region
bucket_key = module.s3_access_key.bucket_id
bucket_sim_files = module.s3_sim_files.bucket_id
}
}
我的问题是我无法访问这些变量,然后我无法通过“ args”或使用param。
你们曾经遇到过吗?
I'm working on automating some software installation on Windows AWS EC2. My infrastructure as a dev environment and a prod environment. So to handle that i'm trying to pass through user data some variables :
data "template_file" "template_name" {
template = file("user-data/user-data-software.ps1")
vars = {
aws_region = var.region
bucket_key = module.s3_access_key.bucket_id
bucket_sim_files = module.s3_sim_files.bucket_id
}
}
My issue is that I'm not able to access these variables, I couldn't get then through 'args' or with param.
Do you guys ever encounter this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论