### Install and Run Pre-commit Hooks Source: https://github.com/cloudposse-terraform-components/aws-tfstate-backend/blob/main/AGENTS.md Install the pre-commit framework locally and run all configured hooks. This includes linting and formatting checks for Terraform and other project files. ```bash pre-commit install && pre-commit run -a ``` -------------------------------- ### Configure Terraform Backend (YAML) Source: https://github.com/cloudposse-terraform-components/aws-tfstate-backend/blob/main/src/README.md Example YAML configuration for the `tfstate-backend` component. This snippet defines S3 backend settings, Spacelift workspace integration, and access role configurations for managing Terraform state. ```yaml terraform: tfstate-backend: backend: s3: role_arn: null settings: spacelift: workspace_enabled: false vars: enable_server_side_encryption: true enabled: true force_destroy: false name: tfstate prevent_unencrypted_uploads: true access_roles: default: &tfstate-access-template write_enabled: true allowed_roles: core-identity: ["devops", "developers", "managers", "spacelift"] core-root: ["admin"] denied_roles: {} allowed_permission_sets: core-identity: ["AdministratorAccess"] denied_permission_sets: {} allowed_principal_arns: [] denied_principal_arns: [] ``` -------------------------------- ### Explore Additional Atmos Test Options Source: https://github.com/cloudposse-terraform-components/aws-tfstate-backend/blob/main/README.md View available command-line options and configurations for running Terraform tests with Atmos. Use this to understand advanced usage and customization. ```bash atmos test --help ``` -------------------------------- ### Generate src/README.md with Atmos Source: https://github.com/cloudposse-terraform-components/aws-tfstate-backend/blob/main/AGENTS.md Use this command to regenerate the README.md file specifically for the src/ directory. This is useful for module-specific documentation. ```bash atmos docs generate readme-simple ``` -------------------------------- ### Generate README.md with Atmos Source: https://github.com/cloudposse-terraform-components/aws-tfstate-backend/blob/main/AGENTS.md Use this command to regenerate the main README.md file from the README.yaml configuration and Terraform source files. Ensure README.yaml is updated when inputs or outputs change. ```bash atmos docs generate readme ``` -------------------------------- ### Initialize TFLint Source: https://github.com/cloudposse-terraform-components/aws-tfstate-backend/blob/main/AGENTS.md Initialize TFLint, which is used for static analysis of Terraform code. This command reads configuration from .tflint.hcl. ```bash tflint --init ``` -------------------------------- ### Run Terratest Suite with Atmos Source: https://github.com/cloudposse-terraform-components/aws-tfstate-backend/blob/main/AGENTS.md Execute the Terratest suite located in the test/ directory. This command creates and destroys real AWS resources, so ensure AWS credentials are configured. Be aware of potential AWS costs. ```bash atmos test run ``` -------------------------------- ### Format Terraform Code Recursively Source: https://github.com/cloudposse-terraform-components/aws-tfstate-backend/blob/main/AGENTS.md Recursively format all Terraform files in the current directory and its subdirectories. This ensures consistent indentation and style. ```bash terraform fmt -recursive ``` -------------------------------- ### Clean Up Terraform Test Artifacts with Atmos Source: https://github.com/cloudposse-terraform-components/aws-tfstate-backend/blob/main/README.md Remove any artifacts generated during Terraform test runs using the Atmos CLI. This helps maintain a clean testing environment. ```bash atmos test clean ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.