-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New resource: aws_invoicing_invoice_unit
#44892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
aws_invoicing_invoice_unit
|
Latest after changes: % make t T=TestAccInvoicingInvoiceUnit_basic K=invoicing
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_invoicing_invoice_unit 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/invoicing/... -v -count 1 -parallel 20 -run='TestAccInvoicingInvoiceUnit_basic' -timeout 360m -vet=off
2025/10/31 17:35:51 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/31 17:35:51 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN TestAccInvoicingInvoiceUnit_basic
=== PAUSE TestAccInvoicingInvoiceUnit_basic
=== CONT TestAccInvoicingInvoiceUnit_basic
--- PASS: TestAccInvoicingInvoiceUnit_basic (13.90s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/invoicing 19.366s |
gdavison
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments
|
|
||
| // @FrameworkResource("aws_invoicing_invoice_unit", name="Invoice Unit") | ||
| // @Tags(identifierAttribute="arn") | ||
| func newInvoiceUnitResource(_ context.Context) (resource.ResourceWithConfigure, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider implementing Resource Identity. Because of the environment variables used in the tests, you'll likely have to create the tests manually by setting the annotation @Testing(identityTest=false)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Framework/identity still makes me nervous...
Co-authored-by: Graham Davison <[email protected]>
Co-authored-by: Graham Davison <[email protected]>
jar-b
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
|
Warning This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
|
This functionality has been released in v6.20.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Description
Adds support for the
aws_invoicing_invoice_unitresource to manage AWS Invoice Units for organizational billing.AWS Invoice Units are a new organizational billing feature that allows enterprises to separate invoicing within a single AWS Organization, eliminating the need for multiple separate Organizations to achieve complex funding requirements. This resource enables Terraform users to programmatically create and manage invoice units, which group specific AWS accounts together for consolidated billing while sending invoices to designated receiver accounts.
Key Features:
Example Usage:
This addresses a significant pain point for large organizations with complex cost allocation needs, as previously they had to maintain entirely separate AWS Organizations just to achieve separate invoicing.
Relations
Closes #40844
Closes #41824
Relates #40900
References
Output from Acceptance Testing
To run the acceptance test, you'll need an AWS Organizations setup with multiple accounts (can be main org and one linked):
Create member accounts (if needed):
Set environment variables:
Note: The test will be skipped if either environment variable is not set. Both accounts must be part of your AWS Organization and you must have appropriate billing permissions in the management account.