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

Autoscaling group "vpc_zone_identifier": conflicts with availability_zones (issue with ASG + Subnets) #243

Open James-Riordan opened 1 year ago

James-Riordan commented 1 year ago

Context: We tried to create an Autoscaling Group (AWS Jet) using a vpcZoneIdentifier pointing to a Subnet. We do not specify availabilityZone, we apply the resource and it seems to create successfully, but then the Subnet's Availability Zone automatically gets applied to the Autoscaling Group. This causes the error above: "vpc_zone_identifier": conflicts with availability_zones. An ASG successfully gets created but Crossplane reports it as Status: False, Sync: False

Crossplane Composition's resources pasted below:

- name: autoscaling-group
      base:
        apiVersion: autoscaling.aws.jet.crossplane.io/v1alpha2
        kind: AutoscalingGroup
        spec:
          forProvider:
            launchTemplate: []
            vpcZoneIdentifier: [subnet-0c5f9940da049a500]
            minSize: 1
            maxSize: 3
          providerConfigRef:
            name: local-user-aws-jet-provider-config
      patches:
        - fromFieldPath: status.data.launchTemplateId
          toFieldPath: spec.forProvider.launchTemplate[0].id
        - type: ToCompositeFieldPath
          fromFieldPath: status.atProvider.id
          toFieldPath: status.data.asgName
        - type: PatchSet
          patchSetName: region
        - type: PatchSet
          patchSetName: name
        - type: PatchSet
          patchSetName: site-label

What environment did it happen in?

Crossplane: v1.10.0 crossplane/provider-jet-aws:v0.5.0

James-Riordan commented 1 year ago

This bug is a priority to resolve for all Crossplane + AWS users. ASGs are the fundamental building blocks of self-hosted Kubernetes as opposed to EKS.

balu-ce commented 1 year ago

Any update on workaround for now !!

balu-ce commented 1 year ago

@James-Riordan dit it worked for you. or do you find any alternatives