# WithExternalAccountBinding

- Module: [Aspire.Hosting.Kubernetes](/reference/api/go/aspire.hosting.kubernetes.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`CertManagerIssuerResource`](/reference/api/go/aspire.hosting.kubernetes/certmanagerissuerresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Configures External Account Binding (EAB) with a key identifier and secret HMAC key resolved at deploy time.

## Remarks

Aspire applies an issuer-specific Kubernetes Secret in cert-manager's cluster resource namespace
at deploy time and attempts to delete it on destroy. The HMAC key is not included in published artifacts.
EAB authorizes account registration, not domain ownership. Preserve cert-manager's separate account-key Secret.
See and
.
Supply fresh credential pairs from a deployment pipeline when registering a new account with
a provider that uses expiring or single-use EAB credentials. Aspire does not acquire or refresh
provider credentials. Existing ACME accounts are reused by cert-manager.

## Definition

```go
func (CertManagerIssuerResource) WithExternalAccountBinding(
    keyId ParameterResource,
    hmacKey ParameterResource,
) CertManagerIssuerResource
```

## Parameters

- `keyId` (`ParameterResource`) -- A parameter containing the key identifier supplied by the ACME provider.
- `hmacKey` (`ParameterResource`) -- A secret parameter containing the provider's base64url-encoded HMAC key.

## Returns

[`CertManagerIssuerResource`](/reference/api/go/aspire.hosting.kubernetes/certmanagerissuerresource.md) -- The resource builder.

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

## Applies to

- [`CertManagerIssuerResource`](/reference/api/go/aspire.hosting.kubernetes/certmanagerissuerresource.md)
