Skip to content

Conversation

@sapr797
Copy link

@sapr797 sapr797 commented Dec 1, 2025

his PR adds homework 05 directory imported from netology-code/ter-homeworks repository.

Contents:

  • 05/demo/ - demonstration Terraform files
  • 05/gitlab-ci.yml - GitLab CI configuration
  • 05/hw-05.md - homework instructions and tasks

Задание 5.4
Задание 5.4 Проверочный скрипт. Проверка MySQL модулей (ТОЛЬКО ПЛАН)
Задание 5.4 проверочный скрипт для безопасного тестирования MySQL модулей с немедленным удалением ресурсов
terraform-04
- Remove all hardcoded secrets from providers.tf files
- Fix TFLint warnings by removing unused variables
- Pass Terraform validation
- Pass Checkov security scan
- Fix marketing_vm module security group configuration
- Code quality improvements completed
Hotfix: Fix TFLint warnings and remove security issue
- Copy only Terraform configuration files from terraform-hotfix-final
- Exclude state files and backups
- Place in 04/src/06-s3-bucket for proper organization
Task 6*: Add S3 bucket configuration
- Deployed Vault server using Docker with KV v1 engine
- Created initial secret 'secret/example' via Vault CLI
- Configured Terraform Vault provider with token authentication
- Successfully read existing secrets using vault_generic_secret data source
- Created new secrets using vault_generic_secret resource
- Implemented proper output display using nonsensitive() function
- Verified integration through comprehensive testing script
- All requirements met: secret creation, reading, and output display
Complete task 7*: HashiCorp Vault integration with Terraform
…ote state

- Create separate VPC module with network, subnet, and security group
- Create separate VM module that depends on VPC outputs
- Configure remote state backend using S3 bucket from task 6*
- Use terraform_remote_state data source for cross-module communication
- Provide deployment scripts and comprehensive documentation
- Implement proper module separation with state isolation

Key Features:
- VPC module stores state in s3://bucket/vpc/terraform.tfstate
- VM module stores state in s3://bucket/vm/terraform.tfstate
- VM module reads VPC state using terraform_remote_state data source
- Modules can be developed and deployed independently
- Safe state management and team collaboration enabled
- Remove invalid providers.tf file from 05/ directory containing bash script
- Ensure all Terraform files are properly formatted
- Run terraform fmt -recursive to fix formatting
- Clean up any non-Terraform content from .tf files
- Update Terraform versions from 1.12.0 to >=1.0 in multiple directories
- Fix duplicate provider configurations in 04/src
- Remove duplicate outputs in marketing_vm module
- Fix vm_module in task 8*:
  * Update terraform_remote_state with correct endpoint URL
  * Add required region parameter
  * Remove unsupported yandex_compute_instance_update resource
  * Use nat_ip_address in network_interface instead
- Remove problematic .terraform cache directories
- Add .terraformignore to exclude demo directories
- Ensure all critical directories pass formatting check

Key improvements:
- All Terraform files now properly formatted
- Task 8* modules have valid syntax
- Removed version conflicts
- Fixed backend configuration issues
Complete task 8*: Split root module into VPC and VM modules using rem…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant