Comments (1)
Hi @nileshbhadana!
The good news is that this action runs taskcat and the AWS CloudFormation Linter in the background, so we can leverage functionality from those tools to configure how our linter behaves!
Ideally you'd be able to leverage the new functionality introduced in cfn-lint release v0.43.0, which allows you to provide your own schema specification and have the CloudFormation Linter actually recognize your custom CloudFormation resource. I'm still trying to figure that option out though—I'll play with it a bit more, and let you know if I can get a solution working!
Answering your question more directly though, here are a few options to disable specific rules, or linting altogether—let me know what you think!
Option 1: disable cfn-lint rules on specific resources
You can configure cfn-lint to skip certain checks directly in your CloudFormation template by leveraging the resource's Metadata
attribute.
For example, using the example template provided in the project you linked, you can add the following lines to ignore the E3001 rule for the myCluster
resource only:
Resources:
# EKS Cluster
myCluster:
Type: "AWSQS::EKS::Cluster"
Properties:
RoleArn: !GetAtt serviceRole.Arn
KubernetesNetworkConfig:
ServiceIpv4Cidr: "192.168.0.0/16"
ResourcesVpcConfig:
SubnetIds: !Ref SubnetIds
SecurityGroupIds: !Ref SecurityGroupIds
EndpointPrivateAccess: true
EndpointPublicAccess: false
EnabledClusterLoggingTypes: ["audit"]
KubernetesApiAccess:
Users:
- Arn: !Sub "arn:${AWS::Partition}:iam::${AWS::AccountId}:user/my-user"
Username: "CliUser"
Groups: ["system:masters"]
Roles:
- Arn: !Sub "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/my-role"
Username: "AdminRole"
Groups: ["system:masters"]
Tags:
- Key: ClusterName
Value: myCluster
+ Metadata:
+ cfn-lint:
+ config:
+ ignore_checks:
+ - E3001
Option 2: globally disable certain linting rules using a config file
If modifying your CloudFormation template ends up being trickier than expected, you can use a configuration file to globally disable certain cfn-lint rules.
In my case, I created a file called .cfnlintrc.yaml
in my project's root directory, and configured it to globally ignore the E3001 rule, as follows:
---
ignore_checks:
- E3001
Option 3: disable linting altogether by passing the --lint-disable
parameter
If the cfn-lint configuration options don't work out for you, taskcat allows you to pass the --lint-disable
parameter when running your tests, which skips the CloudFormation linting step altogether.
You can pass that parameter to this action by modifying your workflow file under .github/workflows/
as shown below:
- name: Run taskcat test run
uses: ShahradR/action-taskcat@v1
with:
- commands: test run
+ commands: test run --lint-disable
from action-taskcat.
Related Issues (20)
- Publish and maintain major version references (v1, v2, etc.) for this action HOT 3
- Cannot add problem matchers when running workflows using act HOT 1
- Configure Dependabot to prefix GitHub Action update pull requests with "ci" HOT 1
- Create README.md for project
- Directly use the taskcat/taskcat Docker container HOT 4
- Get the action ready to be published to the GitHub Marketplace HOT 1
- System.ArgumentException is thrown when running the action on GitHub hosted runners HOT 1
- README file lists action input as `command` instead of `commands`
- Github Taskcat action is failing with nodejs dependency issue. HOT 5
- Update the README to point contributors to the aws-quickstart/taskcat repo for non-Action related issues HOT 1
- Cannot build docker image because of a PyYAML issue.
- Add code scanning support to the project
- README file contains broken links to the taskcat repository HOT 1
- Action should fail when no parameters are passed
- Switch to TypeScript/JavaScript to better integrate with GitHub APIs HOT 1
- Cannot find the dist/index.js file when the action is invoked from another repository
- ERROR: unsatisfiable constraints error thrown when building the Docker container HOT 2
- Update the taskcat version to 0.9.23 from current 0.9.19 HOT 12
- --minimal-output for non test run HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-taskcat.