Closed haf-tech closed 2 years ago
had the same problem today! Solution seems to be, to trim created whitespace from tls key, before assigning the public key to the ibm_is_ssh resource. Discussed here: https://github.com/IBM-Cloud/terraform-provider-ibm/issues/3639
@julianhahn yes, trim is in my case not working because I do not handling the key content, but key files. this is the reason why I already integrate the tf attribute to ignore_changes
as workaround.
Resolved here #3701
Fixed in latest release
Community Note
Terraform CLI and Terraform IBM Provider Version
Terraform:
v1.1.5
(via IBM Schematics) IBM-Cloud/ibmv1.40.1
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
content of the SSH keys
Debug Output
but even with adjusted ssh key (without name), I still receive a
must be replaced
Panic Output
Expected Behavior
SSH Keys not changed, resources not changed
Actual Behavior
Somewhat changes the content of the SSH pub keys and removes the name/email at the end of the key This results in a drift and re-applying the same tf (without changes) will results in re-creation of the resource, which fails because the SSH keys are still in use (from the VSI instances)
Steps to Reproduce
terraform apply
Important Factoids
References