# AddBingGroundingConnectionFromParameter

- Module: [Aspire.Hosting.Foundry](/reference/api/go/aspire.hosting.foundry.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`
- Defined on: [`AzureCognitiveServicesProjectResource`](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Adds a Grounding with Bing Search connection to a Microsoft Foundry project using a parameter resource for the Bing resource ID.

## Remarks

This overload allows the Bing resource ID to be supplied as a parameter (e.g., from user secrets
or configuration) rather than a hardcoded string. The parameter value is resolved at deployment time
and embedded in the Bicep template.

## Definition

```go
func (AzureCognitiveServicesProjectResource) AddBingGroundingConnectionFromParameter(
    name string,
    bingResourceId ParameterResource,
) BingGroundingConnectionResource
```

## Parameters

- `name` (`string`) -- The name of the connection resource.
- `bingResourceId` (`ParameterResource`) -- A parameter resource containing the full Azure resource ID of the Bing Search resource.

## Returns

[`BingGroundingConnectionResource`](/reference/api/go/aspire.hosting.foundry/binggroundingconnectionresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`AzureCognitiveServicesProjectResource`](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md)
