1+ # Secrets are NOT stored here. Keys like JwtSettings.SecretKey carry an obvious
2+ # placeholder so the shape of the configuration is visible; the real value is supplied
3+ # at deployment through .NET's environment-variable or user-secrets provider, which
4+ # layers on top of these files. Settex interpolation resolves 'let' bindings at compile
5+ # time — it is not a placeholder for runtime environment variables.
6+
17// Sample Web API Configuration
28// This file demonstrates Settex syntax with a realistic ASP.NET Core Web API setup
39
@@ -89,7 +95,7 @@ env "Staging" {
8995 ConnectionStrings.DefaultConnection = "Server=staging-sql.example.com;Database=SampleWebApiDb;User Id=apiuser;Password=StaginPass123;Encrypt=true"
9096 ConnectionStrings.CacheConnection = "staging-redis.example.com:6379"
9197
92- JwtSettings.SecretKey = "${JWT_SECRET_STAGING} "
98+ JwtSettings.SecretKey = "set-at-deployment "
9399 JwtSettings.ExpirationMinutes = 120
94100
95101 RateLimiting.Enabled = true
@@ -99,7 +105,7 @@ env "Staging" {
99105 Features.EnableMetrics = true
100106
101107 ExternalServices.EmailService.Provider = "SendGrid"
102- ExternalServices.EmailService.ApiKey = "${SENDGRID_API_KEY_STAGING} "
108+ ExternalServices.EmailService.ApiKey = "set-at-deployment "
103109 }
104110}
105111
@@ -109,10 +115,10 @@ env "Production" {
109115 Logging.LogLevel.Default = "Warning"
110116 Logging.LogLevel.Microsoft.AspNetCore = "Error"
111117
112- ConnectionStrings.DefaultConnection = "${DATABASE_CONNECTION_STRING} "
113- ConnectionStrings.CacheConnection = "${REDIS_CONNECTION_STRING} "
118+ ConnectionStrings.DefaultConnection = "set-at-deployment "
119+ ConnectionStrings.CacheConnection = "set-at-deployment "
114120
115- JwtSettings.SecretKey = "${JWT_SECRET_KEY} "
121+ JwtSettings.SecretKey = "set-at-deployment "
116122 JwtSettings.ExpirationMinutes = 30
117123 JwtSettings.RefreshTokenExpirationDays = 30
118124
@@ -125,11 +131,11 @@ env "Production" {
125131 Features.EnableHealthChecks = true
126132 Features.EnableMetrics = true
127133
128- ExternalServices.WeatherApi.ApiKey = "${WEATHER_API_KEY} "
134+ ExternalServices.WeatherApi.ApiKey = "set-at-deployment "
129135 ExternalServices.WeatherApi.TimeoutSeconds = 10
130136
131137 ExternalServices.EmailService.Provider = "SendGrid"
132- ExternalServices.EmailService.ApiKey = "${SENDGRID_API_KEY} "
138+ ExternalServices.EmailService.ApiKey = "set-at-deployment "
133139 ExternalServices.EmailService.FromAddress = "noreply@sampleapi.com"
134140 }
135141}
0 commit comments