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.84k stars 9.19k forks source link

aws_organizations_account returns "Error: invalid value for email" when the email address is in fact valid. #19480

Open AnchorArray opened 3 years ago

AnchorArray commented 3 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Terraform v0.15.3
provider registry.terraform.io/hashicorp/aws v3.42.0

Affected Resource(s)

aws_organizations_account

Terraform Configuration Files

resource "aws_organizations_account" "identity" {
  name                       = "identity"
  parent_id                  = aws_organizations_organizational_unit.identity.id
  email                      = "${var.account_email_user}+identity-root@${var.account_email_host}"
  role_name                  = "OrganizationAccountAccessRole"
  iam_user_access_to_billing = "DENY"
}

Debug Output

https://gist.github.com/andersdberg/4d2c05b5fb260fea9d9ab7e12a4f4178

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform plan
Hotpirsch commented 1 year ago

I also see this error in plan runs. I am not sure if I understand the reporter correctly: Did they say that the plan fails but the apply works nonetheless?