Reputation: 1775
I wish to run a terraform plan to verify a terraform plan file uploaded by a user and detect the resources.
However, running terraform plan as of now requires AWS credentials.
Is there a way to run plan without using the credentials or extract the list of resources in another way from the .tf file?
Upvotes: 6
Views: 5252
Reputation: 1775
Found a solution here,
https://github.com/terraform-providers/terraform-provider-aws/issues/5584#issuecomment-433203543
Along with the skip_credentials_validation flag, a mock secret_key is also required.
provider "aws" {
region = "${var.region}"
skip_credentials_validation = true
skip_requesting_account_id = true
skip_metadata_api_check = true
s3_force_path_style = true
access_key = "mock_access_key"
secret_key = "mock_secret_key"
}
Upvotes: 14