Skip to content
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

fix: Return error when aws_cur_report_definition is not associated with us-east-1 region #36540

Merged
Merged
7 changes: 7 additions & 0 deletions .changelog/36540.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:bug
resource/aws_cur_report_definition: Direct all API calls to the `us-east-1` endpoint as this is the only Region in which AWS Cost and Usage Reports is available
```

```release-note:bug
data-source/aws_cur_report_definition: Direct all API calls to the `us-east-1` endpoint as this is the only Region in which AWS Cost and Usage Reports is available
```
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ require (
syreclabs.com/go/faker v1.2.3
)

require github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.23.3

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ github.com/aws/aws-sdk-go-v2/service/connectcases v1.15.3 h1:L95GltoDtewMcFq15o/
github.com/aws/aws-sdk-go-v2/service/connectcases v1.15.3/go.mod h1:TyZr6RqRlR3hKsh1y1XfbY7+4NRvp3SgMFzxBk1K3Us=
github.com/aws/aws-sdk-go-v2/service/controltower v1.13.3 h1:SG3sGG6K3N6tPMVeJBe98Zx0aXfTZlBDhHn6F0Nqof0=
github.com/aws/aws-sdk-go-v2/service/controltower v1.13.3/go.mod h1:/MVyYMNxCYw1fGAIjcMc4N/gmTfJusFugrFKiKrW1Pw=
github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.23.3 h1:hwFILcm5DB632aqO4NSYIMq+HDJP2+VGA7MeytKuMpE=
github.com/aws/aws-sdk-go-v2/service/costandusagereportservice v1.23.3/go.mod h1:OwHPUjPCdGTQGypglHevR5rbpOp2Uq/1fKlsXDbLdiM=
github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.4.3 h1:nCnaWjpCuKpcvUjnS/xuZTYPNUIWyyDB+br1muzA7Xk=
github.com/aws/aws-sdk-go-v2/service/costoptimizationhub v1.4.3/go.mod h1:GgMyAMEjKSWEMqwTkesHtHygbeh6aKyeGtkJC2XBQNc=
github.com/aws/aws-sdk-go-v2/service/customerprofiles v1.36.3 h1:8akKwsfPSXuuva2PtFOGEJMS/yBOqzt45a7+fiDStEg=
Expand Down
6 changes: 3 additions & 3 deletions internal/conns/awsclient_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/generate/serviceendpointtests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func main() {
}

switch packageName {
case "costoptimizationhub", "route53domains":
case "costoptimizationhub", "cur", "route53domains":
td.Region = "us-east-1"
}

Expand Down
12 changes: 12 additions & 0 deletions internal/service/cur/exports_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package cur

// Exports for use in tests only.
var (
ResourceReportDefinition = resourceReportDefinition

CheckReportDefinitionPropertyCombination = checkReportDefinitionPropertyCombination
FindReportDefinitionByName = findReportDefinitionByName
)
41 changes: 0 additions & 41 deletions internal/service/cur/find.go

This file was deleted.

Loading
Loading