# Deploy GCP Cloud functions to Artifact Registry using Terraform

**URL:** <https://discuss.hashicorp.com/t/deploy-gcp-cloud-functions-to-artifact-registry-using-terraform/35444>\
**Category:** Terraform\
**Created:** [February 9, 2022, 5:16am UTC](https://discuss.hashicorp.com/t/deploy-gcp-cloud-functions-to-artifact-registry-using-terraform/35444 "2022-02-09T05:16:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nraj-willow](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/nraj-willow/32/25807_2.png) [@nraj-willow](https://discuss.hashicorp.com/u/nraj-willow)\
**Post date:** [February 9, 2022, 5:16am UTC](https://discuss.hashicorp.com/t/deploy-gcp-cloud-functions-to-artifact-registry-using-terraform/35444/1 "2022-02-09T05:16:09Z")

</div>

I am trying to deploy cloud function to artifact registry instead of container registry using Terraform.

I have created an artifact repository in GCP and Using the google-beta provider. But I am not able to understand where to mention “docker-registry” path(path for artifact registry)

Following in my main tf file’s create CF:- I have added a parameter called docker-repository(this doesn’t exist in terraform) based on [Google docs](https://cloud.google.com/functions/docs/building#image_registry_options) But looks like this parameter doesn’t exist in terraform and is giving me errors.

```auto
resource "google_cloudfunctions_function" "appConfigService" {
  provider = google-beta
  name = local.function_names.appConfigService
  description = "helloWorld"
  runtime = var.cf_node_run_time
  available_memory_mb = var.cf_memory
  source_archive_bucket = local.deployment_bucket
  source_archive_object = google_storage_bucket_object.appConfigService_archive.name
  entry_point = "helloWorld"
  service_account_email = var.default_service_account[var.environment]
  trigger_http = true
  docker-repository ="<artifact registry path>" //This is wrong

}

```

I am not able to find any documentation on this anywhere. Please let me know the correct way of deploying Cloud functions to artifact repository using terraform.
