feat: Expose bucket_namespace output (References #390)#395
Open
sharansutrapu wants to merge 1 commit into
Open
feat: Expose bucket_namespace output (References #390)#395sharansutrapu wants to merge 1 commit into
sharansutrapu wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
While
bucket_namespacewas recently added to the module's variables and main resource block, it was unfortunately left out ofoutputs.tf. This PR exposess3_bucket_bucket_namespaceso downstream consumers can reference the namespace natively.Note regarding Issue #390: I originally looked at implementing the auto-suffixing logic for
bucket_prefixrequested in #390. However, because Terraform natively appends its random hex generation to the absolute end of thebucket_prefixstring (and AWS requires-anat the absolute end), automatically handling this would require overriding the native provider behavior and generating customrandom_stringresources within the module. I deferred implementing that to avoid introducing brittle string manipulation, but wanted to get this missing output up for review!Motivation and Context
Completes the integration of the
bucket_namespacevariable. References #390.Breaking Changes
None.
How Has This Been Tested?
terraform validatethat the output mapping evaluates perfectly.terraform plan,apply, anddestroycycle against a live AWS environment. Confirmed that the AWS API successfully provisionsaccount-regionalbuckets via the module and that the output correctly exports the state.