Skip to content

Commit

Permalink
Shorting cur names and fixing refs
Browse files Browse the repository at this point in the history
  • Loading branch information
bonya committed Nov 11, 2021
1 parent 49b26ba commit 7cb7856
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions costradar/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ type CostAndUsageReportSubscriptionPayload struct {
type IntegrationMeta struct {
CostAndUsageReportSqsArn string `json:"CostAndUsageReportSqsArn"`
CostAndUsageReportSqsUrl string `json:"CostAndUsageReportSqsUrl"`
CloudTrailSqsArn string `json:"CloudTrailSqsArn"`
CloudTrailSqsUrn string `json:"CloudTrailSqsUrl"`
CloudTrailSqsArn string `json:"CloudTrailSqsArn"`
CloudTrailSqsUrl string `json:"CloudTrailSqsUrl"`
}

type Client interface {
Expand Down
16 changes: 8 additions & 8 deletions costradar/data_source_subscription_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ import (
)

var subscriptionMetaSchema = map[string]*schema.Schema{
"cost_and_usage_report_sqs_arn": {
"cur_report_sqs_arn": {
Type: schema.TypeString,
Computed: true,
},
"cost_and_usage_report_sqs_url": {
"cur_report_sqs_url": {
Type: schema.TypeString,
Computed: true,
},
"cloud_trail_sqs_arn": {
"cloudtrail_sqs_arn": {
Type: schema.TypeString,
Computed: true,
},
"cloud_trail_sqs_url": {
"cloudtrail_sqs_url": {
Type: schema.TypeString,
Computed: true,
},
Expand All @@ -43,10 +43,10 @@ func dataSourceSubscriptionMetaRead(ctx context.Context, d *schema.ResourceData,
if err != nil {
return diag.FromErr(err)
}
d.Set("cost_and_usage_report_sqs_arn", subscriptionMeta.CostAndUsageReportSqsArn)
d.Set("cost_and_usage_report_sqs_url", subscriptionMeta.CostAndUsageReportSqsUrl)
d.Set("cloud_trail_sqs_arn", subscriptionMeta.CostAndUsageReportSqsArn)
d.Set("cloud_trail_sqs_url", subscriptionMeta.CostAndUsageReportSqsUrl)
d.Set("cur_sqs_arn", subscriptionMeta.CostAndUsageReportSqsArn)
d.Set("cur_sqs_url", subscriptionMeta.CostAndUsageReportSqsUrl)
d.Set("cloudtrail_sqs_arn", subscriptionMeta.CloudTrailSqsArn)
d.Set("cloudtrail_sqs_url", subscriptionMeta.CloudTrailSqsUrl)
d.SetId(strconv.FormatInt(time.Now().Unix(), 10))
return diags
}
2 changes: 1 addition & 1 deletion costradar/data_source_subscription_meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestAccSubscriptionMeta(t *testing.T) {
{
Config: testAccDataSubscriptionMetaTF(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(resourceName, "cost_and_usage_report_sqs_arn", "arn:aws:sqs:eu-central-1:123456789012:cur_queue"),
resource.TestCheckResourceAttr(resourceName, "cur_sqs_arn", "arn:aws:sqs:eu-central-1:123456789012:cur_queue"),
),
},
},
Expand Down

0 comments on commit 7cb7856

Please sign in to comment.