CodePipeline -> Creating new codebuild proj within

Hello!

When creating CodePipeline through AWS Console, it allows you to create a CodeBuild project within pipeline creation window, this is done to allow “source” for this build project to be configured as “CodePipeline”. This choice of setting “CodePipeline” as source for a CodeBuild project is NOT available if you create a codebuild project on its own (and not through pipeline creation window).

This option does not seem to be available in the resource block for CodePipeline. It only seems to accept the build project name:

configuration = {
        ProjectName = "frontend-build"
      }

I tried putting a generic name and see if terraform automatically creates a CodeBuild project with source as “CodePipeline”, but it didn’t. Is this a TF limitation or am I doing something wrong?