# Terraform - Infrastructure as Code (Data Engineering) > Providers, resources, state, modules, variables, outputs, plan/apply, workspaces, backends - 20 คำถามสัมภาษณ์ - Senior - [คำถามสัมภาษณ์: Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions.md) ## 1. Terraform คืออะไรและมีข้อได้เปรียบหลักเหนือการกำหนดค่าโครงสร้างพื้นฐานแบบใช้มืออย่างไร? **คำตอบ** Terraform เป็นเครื่องมือ Infrastructure as Code (IaC) ที่พัฒนาโดย HashiCorp ซึ่งช่วยให้สามารถกำหนดและจัดเตรียมโครงสร้างพื้นฐานในลักษณะเชิงประกาศผ่านไฟล์การกำหนดค่า ข้อได้เปรียบหลักคือความสามารถในการทำซ้ำได้: การกำหนดค่าเดียวกันจะให้ผลลัพธ์เดียวกันเสมอ ขจัดข้อผิดพลาดของมนุษย์ และช่วยให้สามารถจัดเวอร์ชันโครงสร้างพื้นฐานเหมือนโค้ดได้ ## 2. บทบาทของ provider ใน Terraform คืออะไร? **คำตอบ** Provider คือปลั๊กอินที่อนุญาตให้ Terraform โต้ตอบกับแพลตฟอร์มเฉพาะ (AWS, GCP, Azure ฯลฯ) มันแปล resources ของ Terraform เป็นการเรียก API ไปยังบริการเป้าหมาย แต่ละ provider ต้องถูกกำหนดค่าด้วย credentials ที่จำเป็น และเปิดเผยประเภท resource ที่มีให้ใช้สำหรับแพลตฟอร์มนั้น ## 3. ความแตกต่างระหว่าง resource และ data source ใน Terraform คืออะไร? **คำตอบ** resource สร้างและจัดการองค์ประกอบของโครงสร้างพื้นฐาน (การสร้าง การแก้ไข การลบ) ในขณะที่ data source อนุญาตให้อ่านข้อมูลเกี่ยวกับ resources ที่มีอยู่โดยไม่ต้องแก้ไข data sources มีประโยชน์สำหรับการอ้างอิงองค์ประกอบที่สร้างขึ้นนอก Terraform หรือโดยการกำหนดค่าอื่นๆ ## มีอีก 17 คำถาม - ไฟล์ terraform.tfstate มีวัตถุประสงค์อะไร? - ควรเรียกใช้คำสั่งใดเพื่อดูการเปลี่ยนแปลงที่ Terraform จะทำโดยไม่นำไปใช้? สมัครฟรี: https://sharpskill.dev/th/login ## หัวข้อสัมภาษณ์ Data Engineering อื่นๆ - [Linux & Shell - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/linux-shell-basics.md): 20 คำถาม, Junior - [Git & GitHub - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/git-github-fundamentals.md): 20 คำถาม, Junior - [Python ขั้นสูงสำหรับ Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/python-advanced-de.md): 25 คำถาม, Junior - [Docker - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/docker-fundamentals.md): 25 คำถาม, Junior - [Google Cloud Platform - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/gcp-fundamentals.md): 20 คำถาม, Junior - [CI/CD และคุณภาพโค้ด](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/ci-cd-code-quality.md): 20 คำถาม, Mid-Level - [Docker Compose](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/docker-compose.md): 20 คำถาม, Mid-Level - [FastAPI - Data API](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/fastapi.md): 20 คำถาม, Mid-Level - [SQL ขั้นสูงสำหรับ Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/sql-advanced-de.md): 20 คำถาม, Mid-Level - [Data Lake - สถาปัตยกรรมและการนำเข้าข้อมูล](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/data-lake.md): 20 คำถาม, Mid-Level - [BigQuery สำหรับ Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/bigquery-de.md): 20 คำถาม, Mid-Level - [PostgreSQL - การดูแลระบบ](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/postgresql-admin.md): 20 คำถาม, Mid-Level - [Data Modeling สำหรับ Data Engineering](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/data-modeling-de.md): 20 คำถาม, Mid-Level - [Fivetran & Airbyte - การนำเข้าข้อมูล](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/fivetran-airbyte.md): 20 คำถาม, Mid-Level - [dbt - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/dbt-fundamentals-de.md): 20 คำถาม, Mid-Level - [Apache Airflow - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/airflow-fundamentals.md): 20 คำถาม, Mid-Level - [Kubernetes - พื้นฐาน](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/kubernetes-fundamentals.md): 20 คำถาม, Mid-Level - [dbt - ฟีเจอร์ขั้นสูง](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/dbt-advanced-de.md): 20 คำถาม, Senior - [รูปแบบ ETL / ELT / ETLT](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/etl-elt-patterns.md): 20 คำถาม, Senior - [Apache Airflow - ขั้นสูง](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/airflow-advanced.md): 20 คำถาม, Senior - [Airflow + dbt - การจัดการ Pipeline](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/airflow-dbt-integration.md): 20 คำถาม, Senior - [PySpark - การประมวลผลขนาดใหญ่](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/pyspark.md): 20 คำถาม, Senior - [Google Pub/Sub - การสตรีมข้อมูล](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/pubsub-streaming.md): 20 คำถาม, Senior - [Apache Beam & Dataflow](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/apache-beam-dataflow.md): 20 คำถาม, Senior - [Kubernetes - Production และ Scaling](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/kubernetes-advanced.md): 20 คำถาม, Senior - [ฐานข้อมูล NoSQL](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/nosql-databases.md): 20 คำถาม, Senior - [Data Architecture สมัยใหม่](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/data-architecture.md): 20 คำถาม, Senior - [การมอนิเตอร์และการสังเกตการณ์](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/monitoring-observability.md): 20 คำถาม, Senior - [IAM และความปลอดภัยของข้อมูล](https://sharpskill.dev/th/technologies/data-engineering/interview-questions/iam-security-de.md): 20 คำถาม, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/th/technologies/data-engineering/interview-questions/terraform