Dhruv Chovatiya on LinkedIn: ➡️Useful Terraform commands along with brief explanations:- 1. terraform… (2024)

Dhruv Chovatiya

Software Engineer | 4x Azure | 1x AWS | Docker | Ansible | Terraform | Windows Administrator | SCCM | Solarwind | Ivanti EPM | LINUX | JAVA | Python | DSA | C++ | HTML and CSS | Cloud Computing

  • Report this post

➡️Useful Terraform commands along with brief explanations:- 1. terraform init: Initializes a working directory containing Terraform configuration files.2. terraform plan: Generates an execution plan, outlining actions Terraform will take.3. terraform apply: Applies the changes described in the Terraform configuration.4. terraform destroy: Destroys all resources described in the Terraform configuration.5. terraform validate: Checks the syntax and validity of Terraform configuration files.6. terraform refresh: Updates the state file against real resources in the provider.7. terraform output: Displays the output values from the Terraform state.8. terraform state list: Lists resources within the Terraform state.9. terraform show: Displays a human-readable output of the current state or a specific resource's state.10. terraform import: Imports existing infrastructure into Terraform state.11. terraform fmt: Rewrites Terraform configuration files to a canonical format.12. terraform graph: Generates a visual representation of the Terraform dependency graph.13. terraform providers: Prints a tree of the providers used in the configuration.14. terraform workspace list: Lists available workspaces.15. terraform workspace select: Switches to another existing workspace.16. terraform workspace new: Creates a new workspace.17. terraform workspace delete: Deletes an existing workspace.18. terraform output: Retrieves output values from a module.19. terraform state mv: Moves an item in the state.20. terraform state pull: Pulls the state from a remote backend.21. terraform state push: Pushes the state to a remote backend.22. terraform state rm: Removes items from the state.23. terraform taint: Manually marks a resource for recreation.24. terraform untaint: Removes the 'tainted' state from a resource.25. terraform login: Saves credentials for Terraform Cloud.26. terraform logout: Removes credentials for Terraform Cloud.27. terraform force-unlock: Releases a locked state.28. terraform import: Imports existing infrastructure into your Terraform state.29. terraform plan -out: Saves the generated plan to a file.30. terraform apply -auto-approve: Automatically applies changes without requiring approval.31. terraform apply -target=resource: Applies changes only to a specific resource.32. terraform destroy -target=resource: Destroys a specific resource.33. terraform apply -var="key=value": Sets a variable's value directly in the command line.34. terraform apply -var-file=filename.tfvars: Specifies a file containing variable definitions.35. terraform apply -var-file=filename.auto.tfvars: Automatically loads variables from a file.

3

Like Comment

To view or add a comment, sign in

More Relevant Posts

  • Dhruv Chovatiya

    Software Engineer | 4x Azure | 1x AWS | Docker | Ansible | Terraform | Windows Administrator | SCCM | Solarwind | Ivanti EPM | LINUX | JAVA | Python | DSA | C++ | HTML and CSS | Cloud Computing

    • Report this post

    I'm excited to share that I've officially earned the **Microsoft Certified: Azure Security Engineer Associate (AZ-500) certification.This accomplishment wouldn't have been possible without the incredible support of Ridhima Mahajan. A huge thank you to Ridhima for providing the insightful training course and exam voucher. Your guidance was invaluable in helping me master the essential security concepts for the Azure cloud platform. I'd also like to express my gratitude to Tech Mahindra for offering this amazing skill development program. It's been a fantastic opportunity to deepen my knowledge and enhance my skill set in a critical area like cloud security.The AZ-500 certification validates my ability to implement, manage, and monitor security for resources in Azure, hybrid, and multi-cloud environments. With cyber threats constantly evolving, robust cloud security has become **absolutely mandatory** for businesses of all sizes. Real-world example:A data breach at a major retail chain could expose millions of customer records. By implementing strong security measures like identity and access controls, network segmentation, and data encryption (all covered in the AZ-500 exam!), organizations can significantly reduce the risk of such attacks.This certification equips me to play a key role in safeguarding sensitive information in the cloud. I'm excited to leverage this newfound expertise and contribute to building secure and resilient cloud environments. #cloudsecurity #AZ500 #microsoftcertified #TechMahindra #careerdevelopment

    • Dhruv Chovatiya on LinkedIn: ➡️Useful Terraform commands along with brief explanations:- 1. terraform… (5)

    24

    1 Comment

    Like Comment

    To view or add a comment, sign in

    • Report this post

    As a DevOps engineer, mastering Ansible commands is essential for managing and orchestrating infrastructure. ➡️Here are some essential Ansible commands you should know:1. ansible-playbook:The workhorse for executing Ansible playbooks, which define tasks to be performed on target hosts.Example usage: ansible-playbook -i <inventory_file> <playbook\.yml>.2. ansible:Used for running ad-hoc commands or tasks on remote hosts.Examples:Copy a file: ansible all -m copy -a "src=/path/to/local/file dest=/path/to/remote/file"Install a package using yum: ansible all -m yum -a "name=httpd state=latest".3. ansible-galaxy:Manage Ansible roles from the Ansible Galaxy community.Install a role: ansible-galaxy install <role_name>.4. ansible-vault:Encrypt and manage sensitive data within Ansible.Encrypt a file: ansible-vault encrypt <file>Edit an encrypted file: ansible-vault edit secrets\.yml.5. ansible-galaxy init:Initiate a new Ansible role scaffold.Example: ansible-galaxy init <role_name>.6. ansible-inventory:Inspect Ansible's inventory.List hosts: ansible-inventory --list -i /path/to/inventory/hosts.7. ansible-config:Customize Ansible configurations.List configuration options: ansible-config listView specific configuration: ansible-config view.8. ansible-pull:Pull playbooks from a version control system and execute them locally.Example: ansible-pull -U <repository_url> <playbook\.yml>.9. ansible-playbook --syntax-check:Check playbook syntax without execution.Example: ansible-playbook --syntax-check <playbook\.yml>.10. ansible-playbook --list-hosts:- List hosts defined in a playbook.- Example: ansible-playbook --list-hosts playbook\.yml.11. ansible-playbook --tags:- Run specific tagged tasks within a playbook.- Example: ansible-playbook --tags=tag1,tag2 playbook\.yml.12. ansible-playbook --limit:- Limit playbook execution to specific hosts or groups.- Example: ansible-playbook --limit=<host_pattern> <playbook\.yml>.13. ansible-doc:- Refer to documentation for Ansible modules.- Example: ansible-doc <module_name>.14. ansible-console:- Start an interactive console for executing Ansible tasks.- Example: ansible-console.15. ansible-lint:- Ensure best practices and identify potential errors.- Example: ansible-lint <playbook\.yml>.16. ansible-vault encrypt_string:- Encrypt strings for secure use in playbooks.- Example: ansible-vault encrypt_string <string>.17. ansible-vault rekey:- Rekey an encrypted file with a new password.- Example: ansible-vault rekey <file>.Remember to explore these commands further and practice using them in real-world scenarios. Happy automating! 🚀🔧

    9

    Like Comment

    To view or add a comment, sign in

  • Dhruv Chovatiya

    Software Engineer | 4x Azure | 1x AWS | Docker | Ansible | Terraform | Windows Administrator | SCCM | Solarwind | Ivanti EPM | LINUX | JAVA | Python | DSA | C++ | HTML and CSS | Cloud Computing

    • Report this post

    As a DevOps engineer working with Kubernetes, you'll find the following commands essential for managing your containerized workloads.Let's dive into the Kubernetes cheat sheet:1. Cluster Management:- kubectl cluster-info: Displays information about the cluster.- kubectl config use-context <context-name>: Switches between different Kubernetes contexts (useful when managing multiple clusters).- kubectl get nodes: Lists all nodes in the cluster.2. Working with Nodes:- kubectl get nodes: Lists all nodes in the cluster.- kubectl describe node <node-name>: Provides detailed information about a specific node.- kubectl drain <node-name>: Safely evicts all pods from a node for maintenance purposes.3. Managing Pods:- kubectl get pods: Lists all pods in the current namespace.- kubectl describe pod <pod-name>: Displays detailed information about a specific pod.- kubectl logs <pod-name>: Retrieves logs from a pod.- kubectl exec -it <pod-name> -- /bin/sh: Opens an interactive shell inside a pod.4. Deployments and Replicas:- kubectl get deployments: Lists all deployments.- kubectl describe deployment <deployment-name>: Provides details about a specific deployment.- kubectl scale deployment <deployment-name> --replicas=<desired-replicas>: Scales the number of replicas for a deployment.5. Services and Networking:- kubectl get services: Lists all services.- kubectl describe service <service-name>: Displays details about a specific service.- kubectl port-forward <pod-name> <local-port>:<pod-port>: Forwards local traffic to a pod.6. Configurations and Secrets:- kubectl get configmaps: Lists all config maps.- kubectl describe configmap <configmap-name>: Provides details about a specific config map.- kubectl get secrets: Lists all secrets.- kubectl describe secret <secret-name>: Displays details about a specific secret.7. Working with Namespaces:- kubectl get namespaces: Lists all namespaces.- kubectl describe namespace <namespace-name>: Provides details about a specific namespace.8. Resource Inspection and Debugging:- kubectl top pods: Displays resource usage (CPU and memory) for pods.- kubectl describe <resource-type> <resource-name>: Provides detailed information about various resources (e.g., pods, services, deployments).- kubectl logs <pod-name> -c <container-name>: Retrieves logs from a specific container within a pod. Remember that these commands are just a starting point, and you can explore more advanced features and options as you become more familiar with Kubernetes. Happy DevOps-ing! 🚀 🔧

    14

    Like Comment

    To view or add a comment, sign in

  • Dhruv Chovatiya

    Software Engineer | 4x Azure | 1x AWS | Docker | Ansible | Terraform | Windows Administrator | SCCM | Solarwind | Ivanti EPM | LINUX | JAVA | Python | DSA | C++ | HTML and CSS | Cloud Computing

    • Report this post

    🌐 **Noteworthy Achievement!** 🌐I am delighted to share that I have successfully completed the AZ-400 (Azure DevOps Engineer Expert) certification exam, a significant accomplishment in my DevOps journey. This achievement wouldn't have been possible without the exceptional support and guidance from my highly skilled colleagues at Tech Mahindra and friends.I extend special thanks to Ridhima Mahajan Mahajan for her precise training and unwavering support throughout this enriching learning experience. Sincere gratitude is also extended to my friend Darshan Patel for being an outstanding mentor, aiding me in showcasing my expertise in DevOps.A big acknowledgment to Vidyasagar Duvvuri for providing invaluable insights and guidance during this exploration of Azure. Here's to continuous growth and success in the ever-evolving field of DevOps! 🚀Thank you, #techmahindra, for fostering an environment that encourages continuous learning and growth. I'm excited about applying my newly acquired skills to contribute even more to our team's success.Let's continue to reach new heights together! #AzureCertified #TeamTechMahindra #ContinuousLearning

    27

    2 Comments

    Like Comment

    To view or add a comment, sign in

  • Dhruv Chovatiya

    Software Engineer | 4x Azure | 1x AWS | Docker | Ansible | Terraform | Windows Administrator | SCCM | Solarwind | Ivanti EPM | LINUX | JAVA | Python | DSA | C++ | HTML and CSS | Cloud Computing

    • Report this post

    🚀 Exciting News! 🚀I am thrilled to announce that I have successfully completed the AZ-104(Azure Administration Associate)certification exam, marking a significant milestone in my journey as an Azure Administrator. I couldn't have achieved this without the incredible support and guidance from my tech-savvy colleagues at Tech Mahindra.Special thanks to Ridhima Mahajan for her precise training and unwavering support throughout this learning adventure. My sincere gratitude also goes out to my teammate Raja Praveen Kumar for being an excellent mentor and helping me showcase my expertise in Azure administration.A big shoutout to Vidyasagar Duvvuri for his invaluable insights and guidance on this Azure exploration.Thank you, #techmahindra , for fostering an environment that encourages continuous learning and growth. I'm excited about applying my newly acquired skills to contribute even more to our team's success.Let's continue to reach new heights together! 🚀💙 #AzureCertified #TeamTechMahindra #ContinuousLearning---

    21

    10 Comments

    Like Comment

    To view or add a comment, sign in

  • Dhruv Chovatiya

    Software Engineer | 4x Azure | 1x AWS | Docker | Ansible | Terraform | Windows Administrator | SCCM | Solarwind | Ivanti EPM | LINUX | JAVA | Python | DSA | C++ | HTML and CSS | Cloud Computing

    • Report this post

    Excited to be announced that I have been recognised as"AQT Ninja" and received a spot award.Thank you Tech Mahindra for recognising my efforts.#TechMahindra #upskilling #learning #automation

    • Dhruv Chovatiya on LinkedIn: ➡️Useful Terraform commands along with brief explanations:- 1. terraform… (21)

    32

    3 Comments

    Like Comment

    To view or add a comment, sign in

  • Dhruv Chovatiya

    Software Engineer | 4x Azure | 1x AWS | Docker | Ansible | Terraform | Windows Administrator | SCCM | Solarwind | Ivanti EPM | LINUX | JAVA | Python | DSA | C++ | HTML and CSS | Cloud Computing

    • Report this post

    👋 Exciting news! Calling upon my LinkedIn family to embark on a coding journey with me. Let's dive into the world of coding at #ninjaslayground and #CodingNinjasStudio. Join me as we tackle challenges, optimize solutions, and master time and space complexities. #codingcommunity #LearnToCode

    11

    Like Comment

    To view or add a comment, sign in

Dhruv Chovatiya on LinkedIn: ➡️Useful Terraform commands along with brief explanations:- 1. terraform… (26)

Dhruv Chovatiya on LinkedIn: ➡️Useful Terraform commands along with brief explanations:- 1. terraform… (27)

1,479 followers

  • 17 Posts

View Profile

Follow

Explore topics

  • Sales
  • Marketing
  • Business Administration
  • HR Management
  • Content Management
  • Engineering
  • Soft Skills
  • See All
Dhruv Chovatiya on LinkedIn: ➡️Useful Terraform commands along with brief explanations:- 

1. terraform… (2024)
Top Articles
Latest Posts
Article information

Author: Roderick King

Last Updated:

Views: 5891

Rating: 4 / 5 (51 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Roderick King

Birthday: 1997-10-09

Address: 3782 Madge Knoll, East Dudley, MA 63913

Phone: +2521695290067

Job: Customer Sales Coordinator

Hobby: Gunsmithing, Embroidery, Parkour, Kitesurfing, Rock climbing, Sand art, Beekeeping

Introduction: My name is Roderick King, I am a cute, splendid, excited, perfect, gentle, funny, vivacious person who loves writing and wants to share my knowledge and understanding with you.