Skip to content

feat(git): add ability for users to update git resources - #1634

Draft
tomkillen wants to merge 2 commits into
stackitcloud:mainfrom
tomkillen:feat-git-update-resource
Draft

feat(git): add ability for users to update git resources#1634
tomkillen wants to merge 2 commits into
stackitcloud:mainfrom
tomkillen:feat-git-update-resource

Conversation

@tomkillen

Copy link
Copy Markdown

Description

resolves #1633

Note: depends on adding the update waiter to stackit-sdk-go (see PR for stackit-sdk-go here stackitcloud/stackit-sdk-go#9328)

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

Comment thread docs/resources/git.md
subcategory: ""
description: |-
Git Instance resource schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources. This resource currently does not support updates. Changing the ACLs, flavor, or name will trigger resource recreation. Update functionality will be added soon. In the meantime, please proceed with caution. To update these attributes, please open a support ticket.

@rubenhoenle rubenhoenle Jul 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short note without any deep review: We're still consuming the v1beta STACKIT git API here, so this must stay marked as beta

}

// toPatchPayload creates the payload to update a git instance
func toPatchPayload(ctx context.Context, model *Model) (git.PatchInstancePayload, diag.Diagnostics) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func toPatchPayload(ctx context.Context, model *Model) (git.PatchInstancePayload, diag.Diagnostics) {
func toUpdatePayload(ctx context.Context, model *Model) (git.PatchInstancePayload, diag.Diagnostics) {

Your function is named toPatchPayload, the test is named TestToUpdatePayload. Keep it consistent.

If you need help making a decision, toUpdatePayload is the better name IMO. 😉

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.

git: access-control-list cannot be updated, and the user receives an erroneous "requires replacement" warning if they attempt to do so

2 participants