Anthony Kong
Anthony Kong

Reputation: 40624

Provisioner file failed due to i/o timeout

I got this error message after the connection timeout

This is the provisioner section

  provisioner "file" {
    source      = "scripts/setup.ps1"
    destination = "c:/setup.ps1"
  }


  connection {
    type = "winrm"
    timeout = "10m"
    password = "${rsadecrypt(self.password_data, file("${module.ssh_key_pair.private_key_filename}"))}"
  }

Timeout only appears after the above section is added.

I only wanted to copy a file to the destination.

I have verified that the security group allows incoming WinRM protocol (all outgoing traffics are allowed)

enter image description here

However since I am using OSX I find it hard to test the WinRM ports.

Can you help me to spot any issue with my tf code?

Upvotes: 2

Views: 1977

Answers (1)

Anthony Kong
Anthony Kong

Reputation: 40624

Not sure but after a while it seems to work.

It might take up to 10 minutes for the security group change to take effect.

Upvotes: 1

Related Questions