@@ -785,6 +785,8 @@ public async Task ProjectWithManyReferenceTypes()
785
785
// Postgres uses secret outputs + a literal connection string
786
786
var pgdb = builder . AddAzurePostgresFlexibleServer ( "pg" ) . WithPasswordAuthentication ( ) . AddDatabase ( "db" ) ;
787
787
788
+ var rawCs = builder . AddConnectionString ( "cs" ) ;
789
+
788
790
// Connection string (should be considered a secret)
789
791
var blob = builder . AddAzureStorage ( "storage" ) . AddBlobs ( "blobs" ) ;
790
792
@@ -803,7 +805,8 @@ public async Task ProjectWithManyReferenceTypes()
803
805
. WithReference ( pgdb )
804
806
. WithEnvironment ( "SecretVal" , secretValue )
805
807
. WithEnvironment ( "secret_value_1" , secretValue )
806
- . WithEnvironment ( "Value" , value ) ;
808
+ . WithEnvironment ( "Value" , value )
809
+ . WithEnvironment ( "CS" , rawCs ) ;
807
810
808
811
project . WithEnvironment ( context =>
809
812
{
@@ -851,6 +854,7 @@ public async Task ProjectWithManyReferenceTypes()
851
854
"outputs_azure_container_registry_managed_identity_id": "{.outputs.AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID}",
852
855
"value0_value": "{value0.value}",
853
856
"value1_value": "{value1.value}",
857
+ "cs_connectionstring": "{cs.connectionString}",
854
858
"outputs_azure_container_apps_environment_default_domain": "{.outputs.AZURE_CONTAINER_APPS_ENVIRONMENT_DEFAULT_DOMAIN}",
855
859
"outputs_managed_identity_client_id": "{.outputs.MANAGED_IDENTITY_CLIENT_ID}",
856
860
"outputs_azure_container_apps_environment_id": "{.outputs.AZURE_CONTAINER_APPS_ENVIRONMENT_ID}",
@@ -882,6 +886,9 @@ param value0_value string
882
886
883
887
param value1_value string
884
888
889
+ @secure()
890
+ param cs_connectionstring string
891
+
885
892
param outputs_azure_container_apps_environment_default_domain string
886
893
887
894
param outputs_managed_identity_client_id string
@@ -920,6 +927,10 @@ param api_containerimage string
920
927
name: 'secret-value-1'
921
928
value: value0_value
922
929
}
930
+ {
931
+ name: 'cs'
932
+ value: cs_connectionstring
933
+ }
923
934
]
924
935
activeRevisionsMode: 'Single'
925
936
ingress: {
@@ -995,6 +1006,10 @@ param api_containerimage string
995
1006
name: 'Value'
996
1007
value: value1_value
997
1008
}
1009
+ {
1010
+ name: 'CS'
1011
+ secretRef: 'cs'
1012
+ }
998
1013
{
999
1014
name: 'HTTP_EP'
1000
1015
value: 'http://api.internal.${outputs_azure_container_apps_environment_default_domain}'
0 commit comments