0

I am using visual studio code for terraform development and handling the deployment through Azure Devops. During deployment I am using replace tokens task to replace gitUser and gitAccessToken (Personal access token) values, which works without any issues. But, I can't find a way during development in my local PC. Currently, I am masking the current source line and adding a new line with original values. Is there an alternate way of doing this?

module "az-resource-group" {
  source              = "git::https://#{gitUser}#:#{gitAccessToken}#@github.com/myorg/Module-RG"
  resource_group_name = var.resource_group_name
  location            = var.location
  tags                = var.tags
}
Dilly B
  • 1,280
  • 2
  • 11
  • 15

1 Answers1

0

You can refer to the doc to protect sensitive input variables in Terraform. Hope this similar ticket How to pass Variables to Terraform modules via CLI or tfvars file? would help you.

Vita Zhang-MSFT
  • 246
  • 1
  • 4
  • Hi Dilly, just checking to see if the information provided was helpful. If my reply helped or gave a right direction, appreciate for [marking it as an answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work/5235#5235) which will also help others in the community. – Vita Zhang-MSFT Dec 22 '22 at 08:07