idealo / terraform-provider-controltower

Use AWS Control Tower from Terraform
https://registry.terraform.io/providers/idealo/controltower
Mozilla Public License 2.0
21 stars 10 forks source link

Cannot import existing accounts #191

Open sinkr opened 1 year ago

sinkr commented 1 year ago

Terraform Version

Terraform v1.6.1
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v5.21.0
+ provider registry.terraform.io/idealo/controltower v1.3.0

Affected Resource(s)

Please list the resources as a list, for example:

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "controltower_aws_account" "testing" {
  name                = "Testing"
  email               = "tech+testing@redacted.com"
  organizational_unit = "testing"

  sso {
    first_name = "Redacted"
    last_name  = "Tech"
    email      = "tech@redacted.com"
  }
}

Actual Behavior

terraform import controltower_aws_account.testing pp-<redacted>
var.region
  The AWS region that we will be operating on.

  Enter a value: us-east-1

╷
│ Error: Missing required argument
│
│ The argument "region" is required, but was not set.
╵

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform import controltower_aws_account.testing pp-<redacted>

Expected behavior is the resource is imported.