Skip to content

Files

Latest commit

4e8eb8d · Oct 12, 2022

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 12, 2022

cloudformation-lacework

Set up local type configuration

When running contract or SAM tests locally, the resources expect the Lacework Url, AccessKeyId, and SecretKey to be available via the type configuration. Add the following to ~/.cfn-cli/typeconfiguration.json. Replace the values inside the square brackets with the actual values for testing

{
    "LaceworkAccess": {
        "Url": "https://[MY_LACEWORK].lacework.net/api/v2",
        "AccessKeyId": "[MY_ACCESS_KEY_ID]",
        "SecretKey": "[MY_SECRET_KEY]"
    }
}

See Generate API Access Keys and Tokens for how to generate the necessary keys.

You must have a Lacework account to run these tests.

Testing

Some of the contract tests for specific resources require pre-configured setup. This is documented in the README.md files of those resources.

To run the contract tests for a specific resource you need to update the overrides.json file for that resource. Replace any values within <> with actual values that will work with your account. You can then run the contract tests with the command: cfn test