Skip to content

Allow simple string replace #124

Closed
Closed
@applike-ss

Description

@applike-ss

As per this comment: crossplane/crossplane#3025 (comment) i assume that this is the right place to post this request.

I would like to see a simple string replacement implementation, that could be used like this:

  - type: CombineFromComposite
    combine:
      variables:
        - fromFieldPath: status.availability
        - fromFieldPath: spec.claimRef.namespace
        - fromFieldPath: spec.parameters.name
      strategy: string
      string:
        fmt: "%s.%s.%s"
        replace:
          search: 'public'
          replace: 'pub'
    toFieldPath: spec.forProvider.topic.name 

Originally taken from: crossplane/crossplane#3026 but slightly adjusted.

The code snippet is just a rough example and may not be perfectly matching how inputs for the function should be specified.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions