这是indexloc提供的服务,不要输入任何密码
Skip to content

Cannot import vercel_project_deployment_retention: deployment retention not found #207

@lohrm-stabl

Description

@lohrm-stabl

The docs (https://github.com/vercel/terraform-provider-vercel/blob/71a655f75a51b204e511a76b2f7419fca99e2789/examples/resources/vercel_project_deployment_retention/import.sh) say:

# You can import via the team_id and project_id.
# - team_id can be found in the team `settings` tab in the Vercel UI.
# - project_id can be found in the project `settings` tab in the Vercel UI.
terraform import vercel_project_deployment_retention.example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

However, this does not seem to work:

terraform import vercel_project_deployment_retention.deployment-retention team_xxx/prj_xxx
vercel_project_deployment_retention.deployment-retention: Importing from ID "team_xxx/prj_xxx"...
╷
│ Error: Error reading project deployment retention
│ 
│ Could not get project deployment retention team_xxx prj_xxx, unexpected error: deployment retention not found
╵

Minimal cdk.tf.json to replicate:

{
  "//": {
    "metadata": {
      "backend": "local",
      "imports": {
        "vercel_project": [
          "webproject"
        ]
      },
      "stackName": "webproject",
      "version": "0.20.7"
    },
    "outputs": {
    }
  },
  "provider": {
    "vercel": [
      {
        "api_token": "xxx",
        "team": "team_xxx"
      }
    ]
  },
  "resource": {
    "vercel_project_deployment_retention": {
      "deployment-retention": {} // <-- this should be imported
    },
    "vercel_project": {
      "webproject": {
        "//": {
          "metadata": {
            "path": "xxx",
            "uniqueId": "webproject"
          }
        },
        "auto_assign_custom_domains": true,
        "automatically_expose_system_environment_variables": true,
        "directory_listing": false,
        "framework": "nextjs",
        "function_failover": false,
        "git_fork_protection": true,
        "git_lfs": false,
        "git_repository": {
          "production_branch": "prod",
          "repo": "xxx",
          "type": "github"
        },
        "name": "webproject",
        "prioritise_production_builds": true,
        "serverless_function_region": "fra1"
      }
    }
  },
  "terraform": {
    "backend": {
      "local": {
        "path": "/workspaces/...hidden.../terraform.external.tfstate"
      }
    },
    "required_providers": {
      "vercel": {
        "source": "vercel/vercel",
        "version": "1.14.0"
      }
    }
  }
}

Also does not work with the import statement.

Edit: Same problem for ProjectFunctionCpu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions