Skip to content

EC2 instance creation fails when specifying an existing network interface #5594

@kylewuolle

Description

@kylewuolle

/kind bug

  1. Create a cluster where a worker machine has an existing network interface specified
  2. awsmachine_controller controller fails to create the worker instance with the following error:
    awsmachine_controller.go:536] "unable to create instance" err=< failed to create AWSMachine instance: failed to run instance: InvalidParameterValue: You cannot specify tags for network interfaces if there are no network interfaces being created by the request.

What did you expect to happen:
I expect the ec2 instance to be created successfully.

Anything else you would like to add:
I have created a PR (#5595) which solves the problem by not adding the tags for network interfaces when providing an existing network interface.

Environment:

  • Cluster-api-provider-aws version: v2.8.4
  • Kubernetes version: (use kubectl version):
    Client Version: v1.32.2 Kustomize Version: v5.5.0 Server Version: v1.33.1
  • OS (e.g. from /etc/os-release): ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions