mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-23 07:02:57 -06:00
8159731c91
Allows users from govcloud and other regions (aws-cn) to now use the following resources correctly: ``` - data "aws_billing_service_account" - data "aws_elb_service_account" - resource "aws_cloudfront_origin_access_identity" - resource "aws_ecs_service" - resource "aws_iam_saml_provider" - resource "aws_lambda_permission" - resource "aws_sns_topic_policy" ```
32 lines
712 B
Go
32 lines
712 B
Go
package aws
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/hashicorp/terraform/helper/schema"
|
|
)
|
|
|
|
// See http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2
|
|
var billingAccountId = "386209384616"
|
|
|
|
func dataSourceAwsBillingServiceAccount() *schema.Resource {
|
|
return &schema.Resource{
|
|
Read: dataSourceAwsBillingServiceAccountRead,
|
|
|
|
Schema: map[string]*schema.Schema{
|
|
"arn": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
func dataSourceAwsBillingServiceAccountRead(d *schema.ResourceData, meta interface{}) error {
|
|
d.SetId(billingAccountId)
|
|
|
|
d.Set("arn", fmt.Sprintf("arn:%s:iam::%s:root", meta.(*AWSClient).partition, billingAccountId))
|
|
|
|
return nil
|
|
}
|