|
| 1 | + |
| 2 | +=== Deploy a started app with config.env entries set via value and value_from |
| 3 | +>>> [CLI] bundle deploy |
| 4 | +Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/apps-config-env-no-drift/default/files... |
| 5 | +✓ Deployment succeeded |
| 6 | +Created apps.myapp |
| 7 | +Files: 2 uploaded, 0 deleted |
| 8 | +Resources: 1 created, 0 changed, 0 deleted, 0 unchanged |
| 9 | + |
| 10 | +=== The Apps API returns deployment env vars with their name only |
| 11 | +>>> [CLI] bundle plan -o json |
| 12 | +[ |
| 13 | + { |
| 14 | + "name": "GREETING" |
| 15 | + }, |
| 16 | + { |
| 17 | + "name": "API_TOKEN" |
| 18 | + } |
| 19 | +] |
| 20 | + |
| 21 | +=== Re-plan is clean: value and value_from are input-only and must not drift |
| 22 | +>>> [CLI] bundle plan |
| 23 | +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged |
| 24 | + |
| 25 | +>>> [CLI] bundle plan -o json |
| 26 | +{ |
| 27 | + "config.env[0].value": { |
| 28 | + "action": "skip", |
| 29 | + "reason": "input_only", |
| 30 | + "old": "hello", |
| 31 | + "new": "hello" |
| 32 | + }, |
| 33 | + "config.env[1].value_from": { |
| 34 | + "action": "skip", |
| 35 | + "reason": "input_only", |
| 36 | + "old": "my-secret", |
| 37 | + "new": "my-secret" |
| 38 | + } |
| 39 | +} |
| 40 | + |
| 41 | +=== A local change to an env value still plans an update |
| 42 | +>>> update_file.py databricks.yml value: hello value: goodbye |
| 43 | + |
| 44 | +>>> [CLI] bundle plan |
| 45 | +update apps.myapp |
| 46 | + |
| 47 | +Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged |
| 48 | + |
| 49 | +>>> [CLI] bundle plan -o json |
| 50 | +{ |
| 51 | + "config.env[0].value": { |
| 52 | + "action": "update", |
| 53 | + "old": "hello", |
| 54 | + "new": "goodbye" |
| 55 | + }, |
| 56 | + "config.env[1].value_from": { |
| 57 | + "action": "skip", |
| 58 | + "reason": "input_only", |
| 59 | + "old": "my-secret", |
| 60 | + "new": "my-secret" |
| 61 | + } |
| 62 | +} |
| 63 | + |
| 64 | +=== Deploy applies the change and the plan is clean again |
| 65 | +>>> [CLI] bundle deploy |
| 66 | +Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/apps-config-env-no-drift/default/files... |
| 67 | +✓ Deployment succeeded |
| 68 | +Updated apps.myapp |
| 69 | +Files: 1 uploaded, 0 deleted |
| 70 | +Resources: 0 created, 1 changed, 0 deleted, 0 unchanged |
| 71 | + |
| 72 | +>>> [CLI] bundle plan |
| 73 | +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged |
| 74 | + |
| 75 | +>>> [CLI] bundle destroy --auto-approve |
| 76 | +The following resources will be deleted: |
| 77 | + delete resources.apps.myapp |
| 78 | + |
| 79 | +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/apps-config-env-no-drift/default |
| 80 | + |
| 81 | +Destroy: 1 deleted |
0 commit comments