@@ -785,6 +785,8 @@ public async Task ProjectWithManyReferenceTypes()
785785 // Postgres uses secret outputs + a literal connection string
786786 var pgdb = builder . AddAzurePostgresFlexibleServer ( "pg" ) . WithPasswordAuthentication ( ) . AddDatabase ( "db" ) ;
787787
788+ var rawCs = builder . AddConnectionString ( "cs" ) ;
789+
788790 // Connection string (should be considered a secret)
789791 var blob = builder . AddAzureStorage ( "storage" ) . AddBlobs ( "blobs" ) ;
790792
@@ -803,7 +805,8 @@ public async Task ProjectWithManyReferenceTypes()
803805 . WithReference ( pgdb )
804806 . WithEnvironment ( "SecretVal" , secretValue )
805807 . WithEnvironment ( "secret_value_1" , secretValue )
806- . WithEnvironment ( "Value" , value ) ;
808+ . WithEnvironment ( "Value" , value )
809+ . WithEnvironment ( "CS" , rawCs ) ;
807810
808811 project . WithEnvironment ( context =>
809812 {
@@ -851,6 +854,7 @@ public async Task ProjectWithManyReferenceTypes()
851854 "outputs_azure_container_registry_managed_identity_id": "{.outputs.AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID}",
852855 "value0_value": "{value0.value}",
853856 "value1_value": "{value1.value}",
857+ "cs_connectionstring": "{cs.connectionString}",
854858 "outputs_azure_container_apps_environment_default_domain": "{.outputs.AZURE_CONTAINER_APPS_ENVIRONMENT_DEFAULT_DOMAIN}",
855859 "outputs_managed_identity_client_id": "{.outputs.MANAGED_IDENTITY_CLIENT_ID}",
856860 "outputs_azure_container_apps_environment_id": "{.outputs.AZURE_CONTAINER_APPS_ENVIRONMENT_ID}",
@@ -882,6 +886,9 @@ param value0_value string
882886
883887 param value1_value string
884888
889+ @secure()
890+ param cs_connectionstring string
891+
885892 param outputs_azure_container_apps_environment_default_domain string
886893
887894 param outputs_managed_identity_client_id string
@@ -920,6 +927,10 @@ param api_containerimage string
920927 name: 'secret-value-1'
921928 value: value0_value
922929 }
930+ {
931+ name: 'cs'
932+ value: cs_connectionstring
933+ }
923934 ]
924935 activeRevisionsMode: 'Single'
925936 ingress: {
@@ -995,6 +1006,10 @@ param api_containerimage string
9951006 name: 'Value'
9961007 value: value1_value
9971008 }
1009+ {
1010+ name: 'CS'
1011+ secretRef: 'cs'
1012+ }
9981013 {
9991014 name: 'HTTP_EP'
10001015 value: 'http://api.internal.${outputs_azure_container_apps_environment_default_domain}'
0 commit comments