Skip to content

[Web Bug] - AWS Quickstart Part 2 - Missing Configuration in Documentation for Crossplane Composition #883

Closed
@wnqueiroz

Description

@wnqueiroz

Description:

I found an issue in the documentation related to Crossplane compositions. The provided example lacks a necessary configuration, which can cause misconfigurations or deployment failures.

I was following the example that defines a composition with an S3 bucket and a DynamoDB table using a function-based patch-and-transform approach. However, the required configuration for provider reference is not included in the documentation.

Steps to Reproduce:

  1. Follow the documentation example to create a Composition similar to:

    apiVersion: apiextensions.crossplane.io/v1
    kind: Composition
    metadata:
      name: dynamo-with-bucket
    spec:
      mode: Pipeline
      pipeline:
        - step: patch-and-transform
          functionRef:
            name: function-patch-and-transform
          input:
            apiVersion: pt.fn.crossplane.io/v1beta1
            kind: Resources
            resources:
              - name: s3Bucket
                base:
                  apiVersion: s3.aws.upbound.io/v1beta1
                  kind: Bucket
                  metadata:
                    name: crossplane-quickstart-bucket
                  spec:
                    forProvider:
                      region: us-east-2
                    providerConfigRef:
                      name: default
                patches:
                  - type: FromCompositeFieldPath
                    fromFieldPath: "spec.location"
                    toFieldPath: "spec.forProvider.region"
                    transforms:
                      - type: map
                        map:
                          EU: "eu-north-1"
                          US: "us-east-2"
              - name: dynamoDB
                base:
                  apiVersion: dynamodb.aws.upbound.io/v1beta1
                  kind: Table
                  metadata:
                    name: crossplane-quickstart-database
                  spec:
                    forProvider:
                      region: "us-east-2"
                      writeCapacity: 1
                      readCapacity: 1
                      attribute:
                        - name: S3ID
                          type: S
                      hashKey: S3ID
                patches:
                  - type: FromCompositeFieldPath
                    fromFieldPath: "spec.location"
                    toFieldPath: "spec.forProvider.region"
                    transforms:
                      - type: map
                        map:
                          EU: "eu-north-1"
                          US: "us-east-2"
      compositeTypeRef:
        apiVersion: database.example.com/v1alpha1
        kind: NoSQL
  2. Deploy the composition and observe the error/missing behavior.

Expected Behavior:

The documentation should include the provider config reference in the DynamoDB spec to ensure the composition works correctly.

Actual Behavior:

The provided example is missing the provider config reference in the DynamoDB spec.

Suggested Fix:

Update the documentation to include the necessary configuration, ensuring that users following the guide do not run into the same issue:

providerConfigRef:
  name: default

Additional Context:

Image

URL: https://docs.crossplane.io/latest/getting-started/provider-aws-part-2/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions