buildResourceNamePart

buildResourceNamePart(args: BuildResourceNamePartArgs): string

Builds a project or account part of a canonical JobCloud resource name.

Remarks

Use this helper when a name requires only one canonical hash. With projectName, it returns the first eight hexadecimal characters of the project-name MD5 hash. With account, it returns the first six hexadecimal characters of the account-ID MD5 hash.

Parameters

Returns

  • string — The canonical project or account name part.

Example

CODE
import { buildResourceNamePart } from '@jobcloud/pulumi-helpers';

const projectPart = buildResourceNamePart({
  projectName: 'checkout-service',
});
const accountPart = buildResourceNamePart({
  account: '000000000000',
});
// <projectHash>, <accountHash>