Commit 6b35e30
fix: use terraform local_file for .claude.json creation
This commit replaces the bash provisioner approach with Terraform's local_file
resource to create .claude.json. This ensures the file exists during Terraform's
planning phase, before Docker evaluates mount points.
Changes:
- Added local_file resource for .claude.json creation
- Made local_file depend on host_directories provisioner
- Removed .claude.json creation from bash provisioner
- Added local_file to docker container's depends_on
Why this fixes the issue:
- local_file creates the file during Terraform plan/apply
- Docker evaluates mounts AFTER Terraform resources are created
- No race condition between provisioner and Docker mount evaluation
- File is guaranteed to exist before Docker tries to mount it
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent a57feda commit 6b35e30
1 file changed
Lines changed: 18 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
48 | 62 | | |
49 | 63 | | |
50 | 64 | | |
| |||
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 88 | + | |
| 89 | + | |
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
| |||
524 | 522 | | |
525 | 523 | | |
526 | 524 | | |
527 | | - | |
| 525 | + | |
| 526 | + | |
528 | 527 | | |
529 | 528 | | |
530 | 529 | | |
| |||
0 commit comments