Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: AWS::CodeBuild::Project - recognize if 2 resources have the same Name #3831

Open
2 tasks
r-heimann opened this issue Nov 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@r-heimann
Copy link

r-heimann commented Nov 19, 2024

Is this feature request related to a new rule or cfn-lint capabilities?

No response

Describe the feature you'd like to request

It would be great if cfn-lint would recognize if a AWS::CodeBuild::Project has the same name as another AWS::CodeBuild::Project - which will cause a deployment failure:

Project1:
  Type: AWS::CodeBuild::Project
  Properties:
    Name: myProjectName
    ServiceRole: !GetAtt ServiceRole.Arn
    Artifacts:
      Type: no_artifacts
    Environment:
      Type: LINUX_CONTAINER
      ComputeType: BUILD_GENERAL1_SMALL
      Image: aws/codebuild/java:openjdk-8
      EnvironmentVariables:
      - Name: varName
        Type: varType
        Value: varValue
    Source:
      Location: codebuild-demo-test/0123ab9a371ebf0187b0fe5614fbb72c
      Type: S3
    TimeoutInMinutes: 10

Project2:
  Type: AWS::CodeBuild::Project
  Properties:
    Name: myProjectName
    ServiceRole: !GetAtt ServiceRole.Arn
    Artifacts:
      Type: no_artifacts
    Environment:
      Type: LINUX_CONTAINER
      ComputeType: BUILD_GENERAL1_SMALL
      Image: aws/codebuild/java:openjdk-8
      EnvironmentVariables:
      - Name: varName
        Type: varType
        Value: varValue
    Source:
      Location: codebuild-demo-test/0123ab9a371ebf0187b0fe5614fbb72c
      Type: S3
    TimeoutInMinutes: 10

Describe the solution you'd like

cfn-lint throws an error that both resources have the same name.

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request

Would this feature include a breaking change?

  • ⚠️ This feature might incur a breaking change
@r-heimann r-heimann changed the title Feature Request: AWS::CodeBuild::Project - recognize if 2 resources have the same Name Feature Request: AWS::CodeBuild::Project - recognize if 2 resources have the same Name Nov 19, 2024
@kddejong
Copy link
Contributor

Going to need a way to add this validation logically. The unfortunate part is we do this validation for primaryIdentifier but for this resource this field is a read only property which means its not the name.

@kddejong kddejong added the enhancement New feature or request label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants