@ -14,10 +14,11 @@ This module lets you fetch all or selective secrets from a [HCP Vault Secrets](h
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					```tf
 
					 
					 
					 
					```tf
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					module "vault" {
 
					 
					 
					 
					module "vault" {
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  source   = "registry.coder.com/modules/hcp-vault-secrets/coder"
 
					 
					 
					 
					  source     = "registry.coder.com/modules/hcp-vault-secrets/coder"
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  version  = "1.0.3"
 
					 
					 
					 
					  version    = "1.0.3"
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  agent_id = coder_agent.example.id
 
					 
					 
					 
					  agent_id   = coder_agent.example.id
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  app_name = "demo-app"
 
					 
					 
					 
					  project_id = "aaa-bbb-ccc"
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					  app_name   = "demo-app"
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					}
 
					 
					 
					 
					}
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					```
 
					 
					 
					 
					```
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -29,6 +30,7 @@ To configure the HCP Vault Secrets module, follow these steps,
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					2. Create an HCP Service Principal from the HCP Vault Secrets app in the HCP console. This will give you the `HCP_CLIENT_ID`  and `HCP_CLIENT_SECRET`  that you need to authenticate with HCP Vault Secrets.
 
					 
					 
					 
					2. Create an HCP Service Principal from the HCP Vault Secrets app in the HCP console. This will give you the `HCP_CLIENT_ID`  and `HCP_CLIENT_SECRET`  that you need to authenticate with HCP Vault Secrets.
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					   
 
					 
					 
					 
					   
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					3. Set `HCP_CLIENT_ID`  and `HCP_CLIENT_SECRET`  variables on the coder provisioner (recommended) or supply them as input to the module.
 
					 
					 
					 
					3. Set `HCP_CLIENT_ID`  and `HCP_CLIENT_SECRET`  variables on the coder provisioner (recommended) or supply them as input to the module.
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					4. Set the `project_id` . This is the ID of the project where the HCP Vault Secrets app is running.
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					> See the [HCP Vault Secrets documentation ](https://developer.hashicorp.com/hcp/docs/vault-secrets ) for more information.
 
					 
					 
					 
					> See the [HCP Vault Secrets documentation ](https://developer.hashicorp.com/hcp/docs/vault-secrets ) for more information.
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -38,10 +40,11 @@ To fetch all secrets from the HCP Vault Secrets app, skip the `secrets` input.
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					```tf
 
					 
					 
					 
					```tf
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					module "vault" {
 
					 
					 
					 
					module "vault" {
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  source   = "registry.coder.com/modules/hcp-vault-secrets/coder"
 
					 
					 
					 
					  source     = "registry.coder.com/modules/hcp-vault-secrets/coder"
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  version  = "1.0.3"
 
					 
					 
					 
					  version    = "1.0.3"
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  agent_id = coder_agent.example.id
 
					 
					 
					 
					  agent_id   = coder_agent.example.id
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  app_name = "demo-app"
 
					 
					 
					 
					  app_name   = "demo-app"
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					  project_id = "aaa-bbb-ccc"
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					}
 
					 
					 
					 
					}
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					```
 
					 
					 
					 
					```
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -51,11 +54,12 @@ To fetch selective secrets from the HCP Vault Secrets app, set the `secrets` inp
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					```tf
 
					 
					 
					 
					```tf
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					module "vault" {
 
					 
					 
					 
					module "vault" {
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  source   = "registry.coder.com/modules/hcp-vault-secrets/coder"
 
					 
					 
					 
					  source     = "registry.coder.com/modules/hcp-vault-secrets/coder"
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  version  = "1.0.3"
 
					 
					 
					 
					  version    = "1.0.3"
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  agent_id = coder_agent.example.id
 
					 
					 
					 
					  agent_id   = coder_agent.example.id
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  app_name = "demo-app"
 
					 
					 
					 
					  app_name   = "demo-app"
 
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 
					  secrets  = ["MY_SECRET_1", "MY_SECRET_2"]
 
					 
					 
					 
					  project_id = "aaa-bbb-ccc"
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					  secrets    = ["MY_SECRET_1", "MY_SECRET_2"]
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					}
 
					 
					 
					 
					}
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					```
 
					 
					 
					 
					```
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -69,6 +73,7 @@ module "vault" {
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  version       = "1.0.3"
 
					 
					 
					 
					  version       = "1.0.3"
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  agent_id      = coder_agent.example.id
 
					 
					 
					 
					  agent_id      = coder_agent.example.id
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  app_name      = "demo-app"
 
					 
					 
					 
					  app_name      = "demo-app"
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					  project_id    = "aaa-bbb-ccc"
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  client_id     = "HCP_CLIENT_ID"
 
					 
					 
					 
					  client_id     = "HCP_CLIENT_ID"
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  client_secret = "HCP_CLIENT_SECRET"
 
					 
					 
					 
					  client_secret = "HCP_CLIENT_SECRET"
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					}
 
					 
					 
					 
					}