I get the following error when pushing my source to a scratch org.
Deterministic encryption not available
I have a permission set assign to my scratch org user that gives me ManageEncryptionKeys
.
I found through googling that I can create a key like so
sfdx force:data:record:create -s TenantSecret -v "Description=scratch"
I then can go to Setup > Security > Encryption > Advanced Settings, and see
What am I missing?
Update based on Mohith's answer. CLI results
Tylers-MacBook-Pro:test tyler$ sfdx force:source:push
*** Deploying with REST ***
Job ID | 0Af2D00000gqqH1SAI
SOURCE PROGRESS | ████████████████████████████████████████ | 2/2 Components
=== Pushed Source
STATE FULL NAME TYPE PROJECT PATH
───── ──────────────────── ──────────────── ─────────────────────────────────────────────────────────────────────────────────
Add HealthCloudGA InstalledPackage force-app/main/default/installedPackages/HealthCloudGA.installedPackage-meta.xml
Add System_Administrator PermissionSet force-app/main/default/permissionsets/System_Administrator.permissionset-meta.xml
Tylers-MacBook-Pro:test tyler$ sfdx force:user:permset:assign -n System_Administrator
=== Permsets Assigned
Username Permission Set Assignment
───────────────────────────── ─────────────────────────
[email protected] System_Administrator
Tylers-MacBook-Pro:test tyler$ sfdx force:data:record:create -s TenantSecret -v "Description=scratch"
Creating Record for TenantSecret... done
Successfully created record: 02G2D0000005KJjUAM.
Tylers-MacBook-Pro:test tyler$ sfdx force:mdapi:deploy -d src --json -w 10
{
"status": 0,
"result": {
"checkOnly": false,
"completedDate": "2021-03-21T06:27:57.000Z",
"createdBy": "0052D000004tVtb",
"createdByName": "User User",
"createdDate": "2021-03-21T06:27:54.000Z",
"details": {
"componentSuccesses": [
{
"changed": "true",
"componentType": "",
"created": "false",
"createdDate": "2021-03-21T06:27:56.000Z",
"deleted": "false",
"fileName": "src/package.xml",
"fullName": "package.xml",
"success": "true"
},
{
"changed": "true",
"componentType": "PlatformEncryptionSettings",
"created": "false",
"createdDate": "2021-03-21T06:27:56.000Z",
"deleted": "false",
"fileName": "src/settings/PlatformEncryption.settings",
"fullName": "PlatformEncryption",
"success": "true"
}
],
"runTestResult": {
"numFailures": "0",
"numTestsRun": "0",
"totalTime": "0.0"
}
},
"done": true,
"id": "0Af2D00000gqr66SAA",
"ignoreWarnings": false,
"lastModifiedDate": "2021-03-21T06:27:57.000Z",
"numberComponentErrors": 0,
"numberComponentsDeployed": 1,
"numberComponentsTotal": 1,
"numberTestErrors": 0,
"numberTestsCompleted": 0,
"numberTestsTotal": 0,
"rollbackOnError": true,
"runTestsEnabled": false,
"startDate": "2021-03-21T06:27:54.000Z",
"status": "Succeeded",
"success": true
}
}
Tylers-MacBook-Pro:test tyler$ sfdx force:source:push
*** Deploying with REST ***
Job ID | 0Af2D00000gqr6QSAQ
SOURCE PROGRESS | █████████████████████████████████████░░░ | 281/306 Components
TYPE PROJECT PATH PROBLEM
───── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────
Error marketing/main/default/objects/Account/fields/Birth_Date_Match__c.field-meta.xml Deterministic encryption not available (3:13)
ERROR running force:source:push: Push failed.
Try this:
Check the order of your dependencies and ensure all metadata is included.