Skip to content

Conversation

@discount-elf
Copy link
Contributor

@discount-elf discount-elf commented Nov 25, 2025

This is draft of what a patch with only provided fields could look like. Unsure if we will carry this forward or not.

new bucket.BucketPatch {
  modify { // name of this node could be better, only needed due to type system limitations
    // must provide the label of the resource to patch
    label = "bucket-to-patch"
    // any properties that are to change validated against the schema inline as expected
    versioningConfiguration = new bucket.VersioningConfiguration {
      status = "Enabled"
    }
  }
}

Sadly if Pkl supported extending Mixin or annotating functions the result could have been:

new Patch<bucket.Bucket> {
  label = "bucket-to-patch"
  versioningConfiguration = new bucket.VersioningConfiguration {
    status = "Enabled"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants