你好朋友你好吗?我要告诉你我遇到的问题。
目前,我遇到一个问题,即在我工作的地方,我们希望使用 terraform 显示 aws 工作区。只有工作区。
我遇到的问题是我拥有的目录服务是与我的域“domain.local”(例如)建立信任关系的 ManagedAD。
在创建工作区时,我想要的是我将为其创建工作区的用户是我的域之一,而不是我的“AWS 域(也称为 ManagedAD)”之一。在这里,我向您展示我的代码:terraform.tfvars
user2 = "pepe.argento"
package_1 = "wsb-bh8rsxt14" #Paquete de Windows para Workspace
main_directory = "d-*" #ID directory for my directory service (the Id of the directory I pass it complete, this is an example)
domain.local = "t-*" (the Id of the directory I pass it complete, this is an example)
变量.tf
variable "user2" {}
output "user2" {
value = var.user2
}
variable "package_1" {}
output "package_1" {
value = var.package_1
}
variable "main_directory" {}
output "main_directory" {
value = var.main_directory
}
variable "domain_local" {}
output "domain_local" {
value = var.domain_local
}
aws_workspaces_workspace.tf
data "aws_workspaces_bundle" "value_windows_10" {
bundle_id = "wsb-bh8rsxt14" # Value with Windows 10 (English)
}
resource "aws_workspaces_workspace" "Workspace1" {
directory_id = var.main_directory.id
bundle_id = data.aws_workspaces_bundle.value_windows_10.id
user_name = var.user2
#root_volume_encryption_enabled = true
# user_volume_encryption_enabled = true
# volume_encryption_key = "alias/aws/workspaces"
workspace_properties {
compute_type_name = "VALUE"
user_volume_size_gib = 50
root_volume_size_gib = 80
running_mode = "AUTO_STOP"
running_mode_auto_stop_timeout_in_minutes = 60
}
tags = {
Area = "Finance"
}
}
我的问题是,我想要创建的工作区供我的本地域的用户使用,与我有信任关系,而不是我的目录服务的用户。你能帮助我如何设置我去与我有信任关系的本地森林中寻找它吗?