# SourceConfigurationProperty

Describes the source deployed to an AWS App Runner service.

It can be a code or an image repository.

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apprunner as apprunner } from 'aws-cdk-lib';
const sourceConfigurationProperty: apprunner.CfnService.SourceConfigurationProperty = {
  authenticationConfiguration: {
    accessRoleArn: 'accessRoleArn',
    connectionArn: 'connectionArn',
  },
  autoDeploymentsEnabled: false,
  codeRepository: {
    repositoryUrl: 'repositoryUrl',
    sourceCodeVersion: {
      type: 'type',
      value: 'value',
    },

    // the properties below are optional
    codeConfiguration: {
      configurationSource: 'configurationSource',

      // the properties below are optional
      codeConfigurationValues: {
        runtime: 'runtime',

        // the properties below are optional
        buildCommand: 'buildCommand',
        port: 'port',
        runtimeEnvironmentSecrets: [{
          name: 'name',
          value: 'value',
        }],
        runtimeEnvironmentVariables: [{
          name: 'name',
          value: 'value',
        }],
        startCommand: 'startCommand',
      },
    },
    sourceDirectory: 'sourceDirectory',
  },
  imageRepository: {
    imageIdentifier: 'imageIdentifier',
    imageRepositoryType: 'imageRepositoryType',

    // the properties below are optional
    imageConfiguration: {
      port: 'port',
      runtimeEnvironmentSecrets: [{
        name: 'name',
        value: 'value',
      }],
      runtimeEnvironmentVariables: [{
        name: 'name',
        value: 'value',
      }],
      startCommand: 'startCommand',
    },
  },
};
```

## Properties

- `authenticationConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnService.AuthenticationConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_apprunner.CfnService.AuthenticationConfigurationProperty.html) — Describes the resources that are needed to authenticate access to some source repositories.

- `autoDeploymentsEnabled`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — If `true` , continuous integration from the source repository is enabled for the App Runner service.

  Each repository change (including any source code commit or new image version) starts a deployment.

  Default: App Runner sets to `false` for a source image that uses an ECR Public repository or an ECR repository that's in an AWS account other than the one that the service is in. App Runner sets to `true` in all other cases (which currently include a source code repository or a source image using a same-account ECR repository).

- `codeRepository`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnService.CodeRepositoryProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_apprunner.CfnService.CodeRepositoryProperty.html) — The description of a source code repository.

  You must provide either this member or `ImageRepository` (but not both).

- `imageRepository`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnService.ImageRepositoryProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_apprunner.CfnService.ImageRepositoryProperty.html) — The description of a source image repository.

  You must provide either this member or `CodeRepository` (but not both).
