terraform - 如何在 aws_eks_cluster 资源上启用 Windows 支持?
问题描述
我想在 eks 上运行 Windows,但我需要根据此文档启用 Windows 支持:https ://docs.aws.amazon.com/eks/latest/userguide/windows-support.html#enable-windows-support
它说我需要运行这个命令:eksctl utils install-vpc-controllers --cluster cluster_name --approve
我正在查看 Terraform aws_eks_cluster 资源:https ://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster
我找不到任何看起来像 install-vpc-controllers 的参数。
如何在 aws_eks_cluster 资源上启用 Windows 支持?
解决方案
You can use the "null_resouce" with provisioner "local_exec".
Example:
resource "null_resource" "install_vpc_controller" {
provisioner "local-exec" {
command = eksctl utils install-vpc-controllers --cluster ${aws_eks_cluster.main.name} --approve
}
}
It's assumed that eks cluster defined like this:
resource "aws_eks_cluster" "main" {
...
}
Tool - eksctl should be installed on host where this terraform script executed.
推荐阅读
- scala - 如何根据变量中的另一列值检索列值
- python - 访问 PyTango 属性值
- java - 安卓 资源编译失败 v3.3
- java - 如何在@SuperBuilder 上使用 Lombok 的 toBuilder
- here-api - 检索流量计数
- c - 读入while循环
- c# - 是否可以防止数据库文件被外部删除/修改而无需在 c# 中打开它?
- listview - Focus timepicker by tapping on image in a list in xamarin.forms
- typescript - 类型'功能组件
' 不可分配给类型 '("input" & FunctionComponent - android - Android EditText 复制/粘贴菜单问题