What is the difference between modules and workspaces in Terraform

+2 votes

Hi Guys,

I am new in Terraform technology. I don't know too much about modules and workspace. Can anyone tell me the difference between modules and workspace in Terraform?

Aug 16, 2020 in Terraform by akhtar
• 38,170 points
426 views

1 answer to this question.

0 votes

Hi@akhtar,

I think a key difference between Terraform Modules and Workspaces is that modules can be inherited and used by other modules and configurations. Terraform Workspaces are intended to be a collection of configurations that represent a single environment, whereas Modules are components that can be utilized by one or more modules/configurations. I think you could use Modules in a similar way to how you are using Workspaces, but you would be contradicting the intent of the Modules.

answered Aug 16, 2020 by MD
• 95,160 points

Related Questions In Terraform

0 votes
1 answer

What is data source in Terraform?

Hi@akhtar, Data sources allow data to be fetched or ...READ MORE

answered Jul 23, 2020 in Terraform by MD
• 95,160 points
510 views
0 votes
2 answers

What is Terraform?

Terraform is a provisioning tool that seems ...READ MORE

answered Aug 28, 2020 in Terraform by nbavis
• 380 points
329 views
0 votes
1 answer

What is a Terraform provider?

Hi@akhtar, Terraform is agnostic to the underlying cloud ...READ MORE

answered Jul 23, 2020 in Terraform by MD
• 95,160 points
156 views
0 votes
1 answer

How to create a namespace in the Kubernetes cluster using Terraform?

Hi@akhtar, You can use kubernetes_namespace resource in your ...READ MORE

answered Sep 13, 2020 in Terraform by MD
• 95,160 points
639 views
0 votes
1 answer

'terraform' is not recognized as an internal or external command, operable program or batch file.

Hi@akhtar, You have to set an environment variable ...READ MORE

answered Jun 10, 2020 in Terraform by MD
• 95,160 points
3,390 views
0 votes
1 answer

How to integrate kubernetes with Terraform?

Hi@akhtar, You can use Kubernetes as your Terraform ...READ MORE

answered Jun 16, 2020 in Terraform by MD
• 95,160 points
208 views
0 votes
1 answer

How to connect OpenStack Cloud with Terraform?

Hi@akhtar, To connect any Cloud, Terraform has a ...READ MORE

answered Jul 5, 2020 in OpenStack by MD
• 95,160 points
220 views
0 votes
1 answer

What is the remote-exec provisioner in Terraform?

Hi@akhtar, You can use a remote-exec provisioner to ...READ MORE

answered Jul 23, 2020 in Terraform by MD
• 95,160 points
1,791 views
0 votes
1 answer

What is the null resource in Terraform?

Hi@akhtar, The null_resource resource implements the standard resource ...READ MORE

answered Sep 29, 2020 in Terraform by MD
• 95,160 points
1,247 views