github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/builtin/providers/aws/data_source_aws_billing_service_account.go (about) 1 package aws 2 3 import ( 4 "fmt" 5 6 "github.com/hashicorp/terraform/helper/schema" 7 ) 8 9 // See http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2 10 var billingAccountId = "386209384616" 11 12 func dataSourceAwsBillingServiceAccount() *schema.Resource { 13 return &schema.Resource{ 14 Read: dataSourceAwsBillingServiceAccountRead, 15 16 Schema: map[string]*schema.Schema{ 17 "arn": { 18 Type: schema.TypeString, 19 Computed: true, 20 }, 21 }, 22 } 23 } 24 25 func dataSourceAwsBillingServiceAccountRead(d *schema.ResourceData, meta interface{}) error { 26 d.SetId(billingAccountId) 27 28 d.Set("arn", fmt.Sprintf("arn:%s:iam::%s:root", meta.(*AWSClient).partition, billingAccountId)) 29 30 return nil 31 }