2016-09-07 00:43:45 -05:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
2016-09-07 17:58:13 -05:00
|
|
|
"github.com/hashicorp/terraform/helper/schema"
|
2016-09-07 00:43:45 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// See http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2
|
|
|
|
var billingAccountId = "386209384616"
|
|
|
|
|
|
|
|
func dataSourceAwsBillingServiceAccount() *schema.Resource {
|
2016-09-07 17:58:13 -05:00
|
|
|
return &schema.Resource{
|
|
|
|
Read: dataSourceAwsBillingServiceAccountRead,
|
|
|
|
|
|
|
|
Schema: map[string]*schema.Schema{
|
|
|
|
"arn": &schema.Schema{
|
|
|
|
Type: schema.TypeString,
|
|
|
|
Computed: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2016-09-07 00:43:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
func dataSourceAwsBillingServiceAccountRead(d *schema.ResourceData, meta interface{}) error {
|
2016-09-07 17:58:13 -05:00
|
|
|
d.SetId(billingAccountId)
|
2016-09-07 00:43:45 -05:00
|
|
|
|
2016-09-07 17:58:13 -05:00
|
|
|
d.Set("arn", "arn:aws:iam::"+billingAccountId+":root")
|
2016-09-07 00:43:45 -05:00
|
|
|
|
2016-09-07 17:58:13 -05:00
|
|
|
return nil
|
2016-09-07 00:43:45 -05:00
|
|
|
}
|