How to run local command using terraform

0 votes
Hi Guys,

I am new in Terraform. I want to run a local command in my system using Terraform. Can anyone help me, how can I do this?
Jun 15, 2020 in Terraform by akhtar
• 38,230 points
1,629 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use provisioner keyword to run a local or remote command. I have attached one example below for your reference.

provisioner "local-exec" {
    command = "chrome  https://www.google.com"
  }

It will open the chrome browser in your local system.

answered Jun 15, 2020 by MD
• 95,440 points

Related Questions In Terraform

0 votes
1 answer

How to attach an EBS volume to EC2 instance using terraform?

Hi@akhtar, You can use aws_volume_attachment resource to attach ...READ MORE

answered Jun 12, 2020 in Terraform by MD
• 95,440 points
8,445 views
0 votes
1 answer

How to create one s3 bucket using terraform?

Hi@akhtar, You can use aws_s3_bucket resources to create ...READ MORE

answered Jun 12, 2020 in Terraform by MD
• 95,440 points
3,670 views
0 votes
1 answer

How to do ssh in EC2 instance using Terraform?

Hi@akhtar, To ssh in your EC2 instance, you ...READ MORE

answered Jun 15, 2020 in Terraform by MD
• 95,440 points
6,745 views
0 votes
1 answer

How to launch one Pod in Minikube using Terraform?

Hi@akhtar, You can use kubernetes_pod resource to launch ...READ MORE

answered Jun 16, 2020 in Terraform by MD
• 95,440 points
3,117 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to create one key in AWS using terraform?

Hi@akhtar, You can use aws_key_pair resource n terraform. ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,440 points
1,351 views
0 votes
1 answer

How to create a folder in S3 bucket using terraform?

Hi@akhtar, You can use aws_s3_bucket_object resource to create one ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,440 points
10,022 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP