Skip to content

google_artifact_registry_repository missing parameter cleanup_policy_dry_run #1966

Open
@Davigugu55

Description

@Davigugu55

Language Server Version

v0.36.4 (?) (vscode-terraform budled version)

Terraform Version

v1.11.3

Client Version

VS Code v1.98.2

Terraform Configuration

terraform {

  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~> 6.20"
    }
  }

  backend "gcs" {
    bucket = "my_bucket_id"
    prefix = "my_subfolder"
  }

}

provider "google" {

  project = "my_project"
  region  = "my_region"
  zone    = "my_zone"

}

data "google_client_config" "providerConfig" {}
data "google_project" "providerConfig" {}

resource "google_artifact_registry_repository" "bulldesk_app" {
  repository_id = "bulldesk-app"
  format        = "DOCKER"
  cleanup_policy_dry_run = true
  location      = data.google_client_config.providerConfig.region

  docker_config {
    immutable_tags = false
  }
}

Steps to Reproduce

  1. Using vscode-terraform create a .tf file with the code above

It will show "Unexpected attribute: An attribute named "cleanup_policy_dry_run" is not expected here", while it is a valid attribute as documented on current Google provider version v6.27.0
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/artifact_registry_repository

Image

Expected Behavior

I shouldn't return an error in the IDE.

Actual Behavior

Returning "Unexpected attribute: An attribute named "cleanup_policy_dry_run" is not expected here" error in the IDE

Gist

No response

Workarounds

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions