You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to get computer SID with ad_computer data with config as below, but failing. Terraform is running on windows 2016 self-hosted agent in DevOps pipeline under account from domain A while trying to find computer object from domain B.DOMAIN.NET (find computer object from domain A.DOMAIN.NET is working well).
data "ad_computer" "saapa" {
provider = ad
computer_id = "CN=NAME,DC=B,DC=DOMAIN,DC=NET"
}
Error
Get-ADComputer : Cannot find an object with identity: 'CN=NAME,DC=B,DC=DOMAIN,DC=NET' under: 'DC=A,DC=DOMAIN,DC=NET'
It seems that with local (windows only) config the target domain is not changed based on the domain_controller attribute in ad provider.
Any suggestions?
Thanks a lot.
The text was updated successfully, but these errors were encountered:
xvepp01
changed the title
Terraform AD provider not working in local (windows only) mode while getting computer objects data from multiple domain
Terraform AD provider not working in local (windows only) mode while getting computer objects data from multiple domains
Nov 16, 2023
Hi, I am trying to get computer SID with ad_computer data with config as below, but failing. Terraform is running on windows 2016 self-hosted agent in DevOps pipeline under account from domain A while trying to find computer object from domain B.DOMAIN.NET (find computer object from domain A.DOMAIN.NET is working well).
// local (windows only)
provider "ad" {
winrm_hostname = ""
winrm_username = ""
winrm_password = ""
domain_controller = "B.DOMAIN.NET"
}
data "ad_computer" "saapa" {
provider = ad
computer_id = "CN=NAME,DC=B,DC=DOMAIN,DC=NET"
}
Error
Get-ADComputer : Cannot find an object with identity: 'CN=NAME,DC=B,DC=DOMAIN,DC=NET' under: 'DC=A,DC=DOMAIN,DC=NET'
It seems that with local (windows only) config the target domain is not changed based on the domain_controller attribute in ad provider.
Any suggestions?
Thanks a lot.
The text was updated successfully, but these errors were encountered: