GoogleCloudPlatform / terraform-google-artifact-registry

Create and manage Artifact Registry repositories
https://registry.terraform.io/modules/GoogleCloudPlatform/artifact-registry/google
Apache License 2.0
11 stars 9 forks source link

unable to use the module: Error: Unsupported block type #17

Closed sreenivas-ps closed 4 months ago

sreenivas-ps commented 6 months ago

Here is usage:

tf version: Terraform v1.5.5 googler providers:

+ provider registry.terraform.io/hashicorp/google v4.84.0
+ provider registry.terraform.io/hashicorp/google-beta v4.84.0
module "docker_repo" {
  source  = "GoogleCloudPlatform/artifact-registry/google"
  version = "~> 0.1"

  project_id    = var.gcp_project
  location      = var.gcp_region
  format        = "DOCKER"
  repository_id = "pci-dev"
}

When I run terraform plan, I get this error:

│ Error: Unsupported block type
│
│   on .terraform/modules/docker_repo/main.tf line 64, in resource "google_artifact_registry_repository" "repo":
│   64:       dynamic "apt_repository" {
│
│ Blocks of type "apt_repository" are not expected here.
╵
╷
│ Error: Unsupported block type
│
│   on .terraform/modules/docker_repo/main.tf line 105, in resource "google_artifact_registry_repository" "repo":
│  105:       dynamic "yum_repository" {
│
│ Blocks of type "yum_repository" are not expected here.
sreenivas-ps commented 6 months ago

it works with google provider version: 5.19 for example (provider version should be > 5)

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

prabhu34 commented 4 months ago

That's right. It is supported from 5.0.0. Will work on updating the minimum versions.