crossplane-contrib / provider-jet-aws

AWS Provider for Crossplane that is built with Terrajet.
https://crossplane.io
Apache License 2.0
37 stars 30 forks source link

mixedInstancesPolicy in AutoscalingGroup is array #210

Closed liorfranko closed 2 years ago

liorfranko commented 2 years ago

What happened?

I'm creating AutoscalingGroup using autoscalinggroups.autoscaling.aws.jet.crossplane.io crd. When I try to use mixedInstancesPolicy and overrides the launch-template, it doesn't work. That's how I'm using the mixedInstancesPolicy

    mixedInstancesPolicy:
      - launchTemplate:
          - launchTemplateSpecification:
              - launchTemplateName: general-dev
                version: $Latest
            override:
              - instanceType: r5.2xlarge

I'm getting the following error: "message": "cannot run refresh: refresh failed: Invalid combination of arguments: \"mixed_instances_policy\": only one of launch_configuration,launch_template,mixed_instances_policy can be specified, but launch_template,mixed_instances_policy were specified.

And according to the Terraform module, mixed_instances_policy and launch_template should be map and not array.

How can we reproduce it?

Create a simple ASG with use mixedInstancesPolicy to override.

What environment did it happen in?

Crossplane version:

AWS, EKS Kubernetes version - 1.19.16