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.83k stars 9.18k forks source link

[Enhancement]: Allow aws_identitystore_user to also update attributes #39223

Open tommyallieri opened 2 months ago

tommyallieri commented 2 months ago

Description

The aws_identitystore_user resource seems to only rely on the CreateUser api endpoint which only supports so many attributes.

Attributes such as "Division" or "Department" are not available though. For this, use of the UpdateUser api endpoint is necessary.

Update resource functionality to set more user attributes than currently exposed with the existing resource.

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

Potential Terraform Configuration

resource "aws_identitystore_user" "example" {
  identity_store_id = tolist(data.aws_ssoadmin_instances.example.identity_store_ids)[0]

  display_name = "John Doe"
  user_name    = "johndoe"
  division     = "Technology"
  department   = "Engineering"

  name {
    given_name  = "John"
    family_name = "Doe"
  }

  emails {
    value = "john@example.com"
  }
}

References

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/identitystore_user https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_CreateUser.html https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_UpdateUser.html

Would you like to implement a fix?

No

github-actions[bot] commented 2 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue