PacktPublishing / AWS-CDK-in-Practice

AWS CDK in Practice, published by Packt
MIT License
53 stars 55 forks source link

Chapter 5 - `Documentation` Section Shows Code Snippet that Does Not Belong to Chapter 5 Codebase #10

Open jpnws opened 7 months ago

jpnws commented 7 months ago

Issue 1

Under the DOCUMENTATION section on Chapter 5, there is a code snippet:

pre_build: {
  'on-failure': 'ABORT',
  commands: [
    'cd web',
    'yarn install',
    `
    echo '{
      "domain_name": "${domainName}",
      "backend_subdomain": "${backendSubdomain}",
      "frontend_subdomain": "${frontendSubdomain}",
      "backend_dev_subdomain": "${backendDevSubdomain}",
      "frontend_dev_subdomain": "${frontendDevSubdomain}"
    }' > src/config.json
    `,
    'cd ../server',
    'yarn install',
    'cd ../infrastructure',
    'yarn install',
  ],
},

However, the above code is nowhere to be found in Chapter 5 codebase: https://github.com/PacktPublishing/AWS-CDK-in-Practice/tree/main/chapter-5-continuous-integration-with-cdk-powered-apps

I've noticed that the code is available from Chapter 7, but showing that code in Chapter 5 can potentially cause a confusion.

Issue 2

In the same Chapter and section, right below the above code snippet, there is a paragraph that talks about the configuration for backendSubdomain, that it is used when creating the ARecord for the backend. The path to a file that the paragraph shows is: infrastructure/lib/ECS/index.ts. However, based on the current Chapter 5 codebase, this file is located in infrastructure/lib/constructs/ECS/index.ts, notice that there is constructs folder in the middle.