vfarcic / crossplane-tutorial

44 stars 322 forks source link

AWS - Compositions - Cannot find version 15.3 for postgres #18

Closed jason-bent closed 5 months ago

jason-bent commented 5 months ago

@vfarcic Great work with the tutorials! I'm currently working through them and adapting where required for specific enterprise constraints.

We encounter an issue under Crossplane Compositions | Tutorial (Part 3) when creating the AWS RDS database ( See [ 1 ] ) It appears Postgres version 15.3 has now dropped off.

crossplane-tutorial/compositions/sql-v1/aws.yaml needs updating to 15.4 or higher.
After this version bump, RDS instance comes up fine πŸ‘

  - name: rdsinstance
    base:
      apiVersion: rds.aws.upbound.io/v1beta1
      kind: Instance
      spec:
        forProvider:
          region: us-east-1
          dbSubnetGroupNameSelector:
            matchLabels:
              crossplane.io/composite: my-db
          vpcSecurityGroupIdSelector:
            matchLabels:
              crossplane.io/composite: my-db
          instanceClass: db.m5.large
          username: masteruser
          engine: postgres
          engineVersion: "15.4" # Bumping version. InvalidParameterCombination: Cannot find version 15.3 for postgres
          skipFinalSnapshot: true
          publiclyAccessible: true
          allocatedStorage: 200
          passwordSecretRef:
            namespace: crossplane-system
            key: password
            name: my-db-password

You can quicky get the supported engine versions

aws rds describe-db-engine-versions --engine postgres |  jq -r '.DBEngineVersions[].EngineVersion'
11.22
12.15
12.16
12.17
12.18
13.11
13.12
13.13
13.14
14.9
14.10
14.11
**15.4**
15.5
15.6
16.1
16.2

[ 1 ]

crossplane beta trace sql my-db -o wide
NAME                                       RESOURCE                    SYNCED   READY   STATUS
SQL/my-db                                                              True     False   Creating: Unready resources: rdsinstance
β”œβ”€ VPC/my-db-dxzld                         vpc                         True     True    Available
β”œβ”€ Subnet/my-db-z6zlj                      subnet-a                    True     True    Available
β”œβ”€ Subnet/my-db-vplhb                      subnet-b                    True     True    Available
β”œβ”€ Subnet/my-db-lrpx5                      subnet-c                    True     True    Available
β”œβ”€ SubnetGroup/my-db-gxwnd                 subnetgroup                 True     True    Available
β”œβ”€ InternetGateway/my-db-cxrmx             gateway                     True     True    Available
β”œβ”€ RouteTable/my-db-bm28k                  routeTable                  True     True    Available
β”œβ”€ Route/my-db-nzjrc                       route                       True     True    Available
β”œβ”€ MainRouteTableAssociation/my-db-8sc84   mainRouteTableAssociation   True     True    Available
β”œβ”€ RouteTableAssociation/my-db-rr46p       routeTableAssociation1a     True     True    Available
β”œβ”€ RouteTableAssociation/my-db-lzmmk       routeTableAssociation1b     True     True    Available
β”œβ”€ RouteTableAssociation/my-db-wbhnr       routeTableAssociation1c     True     True    Available
β”œβ”€ SecurityGroup/my-db-gc4sl               securityGroup               True     True    Available
β”œβ”€ SecurityGroupRule/my-db-vcqff           securityGroupRule           True     True    Available
└─ Instance/my-db-gv8xl                    rdsinstance                 True     False   Creating

Status:
  At Provider:
  Conditions:
    Last Transition Time:  2024-05-01T10:58:22Z
    Reason:                ReconcileSuccess
    Status:                True
    Type:                  Synced
    Last Transition Time:  2024-05-01T10:58:22Z
    Reason:                Creating
    Status:                False
    Type:                  Ready
    Last Transition Time:  2024-05-01T11:18:56Z
    Message:               async create failed: failed to create the resource: [{0 creating RDS DB Instance (terraform-20240501111853069300000052): InvalidParameterCombination: Cannot find version 15.3 for postgres
                           status code: 400, request id: 6ebff90e-f75e-4f57-859d-3d0bd9837ef6  []}]
    Reason:                AsyncCreateFailure
    Status:                False
    Type:                  LastAsyncOperation
Events:
  Type     Reason                           Age                 From                                               Message
  ----     ------                           ----                ----                                               -------
  Warning  CannotResolveResourceReferences  28m (x5 over 29m)   managed/rds.aws.upbound.io/v1beta2, kind=instance  cannot resolve references: mg.Spec.ForProvider.VPCSecurityGroupIds: referenced field was empty (referenced resource may not yet be ready)
  Normal   PendingExternalResource          23m (x23 over 27m)  managed/rds.aws.upbound.io/v1beta2, kind=instance  Waiting for external resource existence to be confirmed
  Normal   CreatedExternalResource          2m (x33 over 28m)   managed/rds.aws.upbound.io/v1beta2, kind=instance  Successfully requested creation of external resource
vfarcic commented 5 months ago

Thanks for letting me know. I just bumped it to 16.2.