Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh-host-fingerprints causes unexpected diff when specifying user data for instance #2800

Open
ndrpnt opened this issue Nov 12, 2024 · 0 comments
Assignees
Labels
bug instance Instance issues, bugs and feature requests priority:highest Bugs filled by customers, security issues

Comments

@ndrpnt
Copy link
Contributor

ndrpnt commented Nov 12, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

terraform -v      
Terraform v1.5.7
on darwin_amd64
+ provider registry.terraform.io/scaleway/scaleway v2.47.0

Affected Resource(s)

  • scaleway_instance_server

Terraform Configuration Files

resource "scaleway_instance_ip" "example" {}

resource "scaleway_instance_server" "example" {
  name   = "example"
  type   = "PLAY2-PICO"
  image  = "ubuntu_noble"
  ip_ids = [scaleway_instance_ip.example.id]

  user_data = {
    foo = "bar"
  }
}

Expected Behavior

  • First terraform apply: Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
  • Second terraform apply: No changes. Your infrastructure matches the configuration.

Actual Behavior

  • First terraform apply: Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
  • Second terraform apply:
    Terraform will perform the following actions:
    
    # scaleway_instance_server.example will be updated in-place
    ~ resource "scaleway_instance_server" "example" {
          id                     = "fr-par-1/8ddc7dda-5900-4888-88e7-45954858df23"
          name                   = "example"
        ~ user_data              = {
            - "ssh-host-fingerprints" = <<-EOT
                  256 SHA256:Ar8UZbObn5a50JNVFRv9a3+UTaikTsuDRhhcwmhYGiU root@example (ED25519)
                  256 SHA256:2wt5gLFSgsfaBVPPjPa4oJKjeC08xXEDt3Dg1Gg3IxY root@example (ECDSA)
                  3072 SHA256:Aczmai9uDBZtZAISLOL1pKjCi+Uduf++18dqoriHEHg root@example (RSA)
              EOT -> null
              # (1 unchanged element hidden)
          }
          # (17 unchanged attributes hidden)
    
          # (2 unchanged blocks hidden)
      }
    
    Plan: 0 to add, 1 to change, 0 to destroy.

Steps to Reproduce

  1. terraform apply
  2. Wait a few minutes, for the instance to boot I guess ?
  3. terraform apply

Important Factoids

Not exactly sure what it takes to reproduce. The diff doesn't always happen and it seems that having a public IP and waiting a few minutes for the instance to boot between 1st and 2nd apply is required.

@remyleone remyleone added bug instance Instance issues, bugs and feature requests labels Nov 12, 2024
@remyleone remyleone added the priority:highest Bugs filled by customers, security issues label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug instance Instance issues, bugs and feature requests priority:highest Bugs filled by customers, security issues
Projects
None yet
Development

No branches or pull requests

3 participants