hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.76k stars 9.12k forks source link

[New]: [New Resource]: PutContactInformation and [New Data Source]: GetContactInformation #28013

Open Papina opened 1 year ago

Papina commented 1 year ago

Description

I would like the ability to create/update the primary account details (Contact Information) accessed here: https://us-east-1.console.aws.amazon.com/billing/home?region=us-east-1#/account

[New Resource]: https://docs.aws.amazon.com/accounts/latest/reference/API_PutContactInformation.html

I would also like to be able to read the current details as a data source, so in the case of multi-account, I could then replicate this value to other member accounts [New Data Source]: https://docs.aws.amazon.com/accounts/latest/reference/API_GetContactInformation.html

Requested Resource(s) and/or Data Source(s)

Account Management

aws_account_primary_contact

Potential Terraform Configuration

resource "aws_account_primary_contact" "account" {
  account_id = "123456789012"
  address    = "123 abc street"
  city       = "Brisbane"
  state      = "QLD"
  postcode   = "4000"
  country    = "Australia"
  phone      = "0400 000 000"
  company    = "Company Pty Ltd"
  website    = "https://www.company.com.au"
}
data "aws_account_primary_contact" "account" {

}


### References

https://docs.aws.amazon.com/accounts/latest/reference/API_PutContactInformation.html
https://docs.aws.amazon.com/accounts/latest/reference/API_GetContactInformation.html

### Would you like to implement a fix?

No
github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

hskrtich commented 1 year ago

The resource was added Apr 2023 https://github.com/hashicorp/terraform-provider-aws/pull/26123

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/account_primary_contact but the data resource has not been implmented.