Closed Alexandre-Delaunay closed 4 years ago
@Alexandre-Delaunay thanks for reporting this. We use GitHub issues for tracking bugs and enhancements to Terraform Core itself, rather than for questions and troubleshooting.
I can see clearly that your configuration isn't working as expected, but it's less clear to me that there is a specific bug in Terraform Core itself. We don't have any specific experience using DSC or Azure on this team - we just maintain Terraform Core itself.
I think that this is an issue to be addressed in the AzureRM Terraform provider, rather than in core. I'm going to label it as such, and the HashiBot will shortly migrate it over to the provider GitHub repository. Please feel free to re-open this if they determine that it is indeed an issue that needs to be addressed in Terraform core.
They may also determine that this is a configuration issue rather than a bug. While we can sometimes help with certain simple problems here, it's better to use the community forum for questions.
This issue has been automatically migrated to terraform-providers/terraform-provider-azurerm#7381 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to terraform-providers/terraform-provider-azurerm#7381.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Version & Windows Server
v0.12.26 Windows Server 2016
Terraform Configuration Files
The following code is my DSC extension
The next is my function RDSDeployment using ARM template from here
Expected Behavior
A successful connection.
Actual Behavior
In my azure pipeline when i run Terraform apply i got the error,
Error: Code="VMExtensionProvisioningError" Message="VM has reported a failure when processing extension 'deployRDS'. Error message: \"DSC Configuration 'RDSDeployment' completed with error(s). Following are the first few: The user name or password is incorrect The SendConfigurationApply function did not succeed.\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionDSCWindowsTroubleshoot "
Additional Context
This script is called from a windows server used like broker to deploy to multiples machines named tses.
Logs from the DSC logs on the windows server (broker),
[[WindowsFeature]RDS-Licensing] Installation succeeded. VERBOSE: [2020-06-05 14:23:06Z] [VERBOSE] [tf-stage-brk1]: [[WindowsFeature]RDS-Licensing] Successfully installed the feature RDS-Licensing. VERBOSE: [2020-06-05 14:23:06Z] [VERBOSE] [tf-stage-brk1]: LCM: [ End Set ] [[WindowsFeature]RDS-Licensing] in 16.9570 seconds. VERBOSE: [2020-06-05 14:23:06Z] [VERBOSE] [tf-stage-brk1]: LCM: [ End Resource ] [[WindowsFeature]RDS-Licensing] VERBOSE: [2020-06-05 14:23:06Z] [VERBOSE] [tf-stage-brk1]: LCM: [ Start Resource ] [[xRDSessionDeployment]Deployment] VERBOSE: [2020-06-05 14:23:06Z] [VERBOSE] [tf-stage-brk1]: LCM: [ Start Test ] [[xRDSessionDeployment]Deployment] VERBOSE: [2020-06-05 14:23:07Z] [VERBOSE] [tf-stage-brk1]: LCM: [ End Test ] [[xRDSessionDeployment]Deployment] in 0.3440 seconds. VERBOSE: [2020-06-05 14:23:07Z] [ERROR] The user name or password is incorrect VERBOSE: [2020-06-05 14:23:07Z] [VERBOSE] [tf-stage-brk1]: LCM: [ End Set ] VERBOSE: [2020-06-05 14:23:07Z] [ERROR] The SendConfigurationApply function did not succeed.
I tried to logs what i receive on the machine,
then try a connection with the same username and password i got from logs,
$adminCreds = @{ UserName = "adminusername@mydomain" ; Password = adminpassword" } [SecureString]$password = ConvertTo-SecureString -String $adminCreds.Password -AsPlainText -Force $username = $adminCreds.UserName -split '\' | Select-Object -last 1 domainCreds = New-Object System.Management.Automation.PSCredential (domainCreds=New−ObjectSystem.Management.Automation.PSCredential(username, $password) Invoke-Command -ComputerName tf-stage-tse1 -ScriptBlock { Get-ChildItem C:\ } -credential $domainCreds
and it succeeded.