Open uravi409 opened 3 years ago
Please remove access keys, secret keys. Please do not post keys in any open forums.
Are you executing the commands on the same folder where scripts saved. by looking this message "To specify a working directory for the plan, use the global -chdir flag." shows you might be on different path.
No i am working on same directory sir
I think you should remove '.' next to plan simply, terraform plan does your job.
after validate i execute plan command its showing error as below and i given script also correct
script 👍
provider "aws" {
region = "us-east-2" access_key = "xxxxxxxxxxxxxxxxxxxxxxx" secret_key = "xxxxxxxxxxxxxxxxxxxxxxx" } resource "aws_instance" "terraform" { ami = "ami-08962a4068733a2b6" instance_type = "t2.micro" key_name = "terraform" security_groups = [ "launch-wizard-2" ] }
Results:
PS E:\Softwares\Devops\Terraform\May2021> terraform plan . ╷ │ Error: Too many command line arguments │ │ To specify a working directory for the plan, use the global -chdir flag. ╵
For more help on using this command, run: terraform plan -help