wallix/terraform-provider-wallix-bastion

[ BUG ] - unable to add RDP_AUDIO_INPUT in RDP subprotocol for a service declaration

Closed this issue · 6 comments

This is a Terraform provider problem. We are using version 0.13.0 however I did not find any correction for later release.

If I declare a service containing RDP_AUDIO_OUTPUT everything works as expected:

resource "wallix-bastion_device_service" "wodd2-dc-ws-co2-id-2124-h_xxxrdp_audio" {
    device_id         = wallix-bastion_device.wodd2-dc-ws-co2-id-2124-h.device_name
    service_name      = "xxxrdp_audio"
    ## service_name      = wallix-bastion_connection_policy.xxxrdp.connection_policy_name
    connection_policy = wallix-bastion_connection_policy.xxxrdp.connection_policy_name
    port              = "3389"
    protocol          = "RDP"
    subprotocols      = [ "RDP_SMARTCARD", "RDP_AUDIO_OUTPUT" ]
    global_domains    = [ wallix-bastion_domain.xxx.domain_name ]
}

But If I add the sub-protocol RDP_AUDIO_INPUT I have an error at the terraform apply:

resource "wallix-bastion_device_service" "wodd2-dc-ws-co2-id-2124-h_xxxrdp_audio" {
    device_id         = wallix-bastion_device.wodd2-dc-ws-co2-id-2124-h.device_name
    service_name      = "xxxrdp_audio"
    ## service_name      = wallix-bastion_connection_policy.xxxrdp.connection_policy_name
    connection_policy = wallix-bastion_connection_policy.xxxrdp.connection_policy_name
    port              = "3389"
    protocol          = "RDP"
    subprotocols      = [ "RDP_SMARTCARD", "RDP_AUDIO_INPUT", "RDP_AUDIO_OUTPUT" ]
    global_domains    = [ wallix-bastion_domain.xxx.domain_name ]
}

The error is:

│ 1038: resource "wallix-bastion_device_service" "wodd2-dc-ws-co0-id-2124-h_xxxrdp_audio" {
│ Error: subprotocols RDP_AUDIO_INPUT not valid for RDP service
│   with wallix-bastion_device_service.wodd2-dc-ws-co1-id-2124-h_xxxrdp_audio,
│   on services.tf line 1049, in resource "wallix-bastion_device_service" "wodd2-dc-ws-co1-id-2124-h_xxxrdp_audio":

And the service is not configured on the bastion host Wallix.

Expected behavior
The service should be provisionned on the Wallix bastion host with the subprotocols RDP_AUDIO_INPUT and RDP_AUDIO_OUTPUT activated.

Desktop (please complete the following information):
We are using Terraform provider v0.13.0 and Wallix Bastion 10.0.9

Thanks

If I make the modification in the GUI it works.
Problem is at the next pipeline reapply it removes ths subprotocol RDP_AUDIO_INPUT.

I can see that it is not listed in the file: https://github.com/wallix/terraform-provider-wallix-bastion/blob/main/bastion/resource_device_service.go

func rdpSubProtocolsValid() []string {
	return []string{
		"RDP_CLIPBOARD_UP",
		"RDP_CLIPBOARD_DOWN",
		"RDP_CLIPBOARD_FILE",
		"RDP_PRINTER",
		"RDP_COM_PORT",
		"RDP_DRIVE",
		"RDP_SMARTCARD",
		"RDP_AUDIO_OUTPUT",
	}
}

Thanks @raphaelbkt, I just updated the list for ssh and RDP.
If you are able to fix issues, do not hesitate to contribute to the code by creating a PR.

Ok I'll do it next time !
Thanks

We are evaluating if we can do some other change to publish it by thursday.

Closing this issue, we released the v0.14.2 that fix this.

Best regards,