Profile Resource for the Salesforce Provider. Please note that Users must have a Profile assigned to them, Profiles cannot be deleted if a User is assigned to it, and Salesforce does not allow the deletion of Users, only deactivation. Terraform will warn after destroy of a User that it has only been deactivated and now removed from state. A common issue with this pattern is a Profile and User created in tandem will fail to delete the Profile on destroy due to the lingering assignment. Should you wish to destroy a created Profile, it's advised that an apply that moves all affected Users to a static Profile be run first, after which the Profile can be safely destroyed.
data "salesforce_user_license" "fdc" {
license_definition_key = "PID_FDC_FREE"
}
resource "salesforce_profile" "example" {
name = "example"
user_license_id = data.salesforce_user_license.fdc.id
description = "example"
}
Import is supported using the following syntax:
# Please note, profiles will import without permissions into set, even if
# the config contains permissions. Please run a subsequent apply to sync.
terraform import salesforce_profile.example 00AB0000000abc1AAA