Skip to content

feat(bucket): add SkipBucketTagging configuration option#773

Merged
aminueza merged 8 commits intomainfrom
771-tofu-planfails-with-error-reading-bucket-tags-starting-with-v3130
Feb 27, 2026
Merged

feat(bucket): add SkipBucketTagging configuration option#773
aminueza merged 8 commits intomainfrom
771-tofu-planfails-with-error-reading-bucket-tags-starting-with-v3130

Conversation

@felladrin
Copy link
Copy Markdown
Collaborator

Add new SkipBucketTagging flag to bucket configuration that allows skipping tagging operations during bucket management.

This is backward compatible. The automatic detection of unimplemented tagging support remains. We're just making it easier for users to disable the feature themselves when needed.

Add new SkipBucketTagging flag to bucket configuration that allows
skipping tagging operations during bucket management.
@felladrin felladrin marked this pull request as ready for review February 27, 2026 09:37
@felladrin felladrin requested a review from Copilot February 27, 2026 09:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new skip_bucket_tagging configuration option to the Minio Terraform provider that allows users to disable bucket tagging operations when their S3-compatible endpoint doesn't support tagging. This addresses issue #771 where providers like Intercolo return unexpected XML responses to tagging requests.

Changes:

  • Added skip_bucket_tagging provider configuration option with environment variable support (MINIO_SKIP_BUCKET_TAGGING)
  • Extended IsS3TaggingNotImplemented error detection to handle additional error patterns including XML unmarshalling errors
  • Implemented graceful tagging operation skipping across bucket and bucket_tags resources with state preservation
  • Added comprehensive unit tests for tagging helper functions

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
minio/provider.go Adds skip_bucket_tagging provider schema configuration
minio/payload.go Adds SkipBucketTagging field to config structs
minio/new_client.go Propagates SkipBucketTagging from config to client
minio/check_config.go Reads skip_bucket_tagging from provider config and propagates to bucket config
minio/tagging_helpers.go Implements helper functions for skipping tagging and detecting unimplemented tagging support
minio/tagging_helpers_test.go Adds comprehensive unit tests for tagging helper functions
minio/resource_minio_s3_bucket.go Integrates skip logic into bucket resource create, read, and update operations; moves IsS3TaggingNotImplemented to helpers
minio/resource_minio_s3_bucket_tags.go Adds skip logic to all bucket_tags CRUD operations with state preservation
minio/resource_minio_s3_bucket_tagging_compat_test.go Adds test for XML unmarshal error detection
docs/index.md Documents the new skip_bucket_tagging provider configuration option
docs/resources/s3_bucket.md Documents tagging requirement and skip option for bucket resource
docs/resources/s3_bucket_tags.md Documents tagging requirement and skip option for bucket_tags resource
templates/index.md.tmpl Template for provider documentation
templates/resources/s3_bucket.md.tmpl Template for bucket resource documentation
templates/resources/s3_bucket_tags.md.tmpl Template for bucket_tags resource documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

felladrin and others added 5 commits February 27, 2026 11:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add missing d.SetId("") in minioDeleteBucketTags to properly remove resource from state
- Fix logic order in minioReadBucket by checking shouldSkipBucketTagging before API call
- Add descriptive test names to TestIsBucketTaggingUnexpectedResponse for better debuggability
- Add acceptance test coverage for skip_bucket_tagging provider configuration
…ing test

- Add force_destroy to ignored attributes during import since it has default value
- Fixes CI test failure in TestAccMinioS3Bucket_SkipBucketTagging

This comment was marked as resolved.

@aminueza aminueza merged commit 102e941 into main Feb 27, 2026
9 of 10 checks passed
@aminueza aminueza deleted the 771-tofu-planfails-with-error-reading-bucket-tags-starting-with-v3130 branch February 27, 2026 14:09
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.

tofu planfails with "error reading bucket tags" starting with v3.13.0

3 participants