# AzureCognitiveServicesProjectResource.AddBingGroundingConnectionFromParameter

- Module: [Aspire.Hosting.Foundry](/reference/api/go/aspire.hosting.foundry.md)
- Defined on: [AzureCognitiveServicesProjectResource](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

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
type AzureCognitiveServicesProjectResource interface {
    // ... omitted for brevity
    AddBingGroundingConnectionFromParameter(
        name string,
        bingResourceId ParameterResource,
    ) BingGroundingConnectionResource
}
```

## Signature

```go
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()`.

## Defined on

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