Extension Version
v2.39.0
VS Code Version
Version: 1.111.0 (user setup)
Commit: ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb
Date: 2026-03-06T23:06:10Z
Electron: 39.6.0
ElectronBuildId: 13330601
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
Operating System
Ubuntu 22.04.5 LTS
Terraform Version
Terraform v1.14.5 on linux_arm64
Steps to Reproduce
- Have Cloudflare provider
~> 4.0 pinned in versions.tf
- Run
terraform init (installs v4.52.5)
- Add a
cloudflare_pages_domain resource using the domain attribute as documented in the installed provider schema:
resource "cloudflare_pages_domain" "domain" {
for_each = toset(var.site.domains)
account_id = var.cloudflare_account_id
project_name = var.site.project_name
domain = each.value
}
- Open the file in VS Code — the extension immediately shows:
Required attribute "name" not specified
Unexpected attribute: An attribute named "domain" is not expected here
- Run
terraform plan — succeeds with no errors
- Confirm with
terraform providers schema -json | python3 -c "import json,sys; s=json.load(sys.stdin); print(list(s['provider_schemas']['registry.terraform.io/cloudflare/cloudflare']['resource_schemas']['cloudflare_pages_domain']['block']['attributes'].keys()))" — outputs ['account_id', 'domain', 'id', 'project_name', 'status']
Expected Behavior
No errors should be shown. The domain attribute is valid for cloudflare_pages_domain in the installed provider version (v4.52.5), as confirmed by both terraform providers schema -json and a successful terraform plan.
Actual Behavior
The extension shows two errors on the cloudflare_pages_domain resource block: Required attribute "name" not specified and Unexpected attribute: An attribute named "domain" is not expected here. The errors persist after reloading the window. terraform plan succeeds without errors.
Terraform Configuration
terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 4.0"
}
}
}
resource "cloudflare_pages_domain" "domain" {
for_each = toset(var.site.domains)
account_id = var.cloudflare_account_id
project_name = var.site.project_name
domain = each.value
}
Project Structure
.
├── versions.tf
└── modules/
└── frontend-site/
├── main.tf
├── variables.tf
└── versions.tf
Gist
No response
Anything Else?
No other Terraform extensions installed.
Workarounds
None found. Reloading the window does not resolve the issue.
References
None found. The Cloudflare provider docs at https://registry.terraform.io/providers/cloudflare/cloudflare/4.52.5/docs/resources/pages_domain confirm domain as the correct attribute, consistent with what terraform providers schema -json reports locally.
Help Wanted
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
Extension Version
v2.39.0
VS Code Version
Version: 1.111.0 (user setup)
Commit: ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb
Date: 2026-03-06T23:06:10Z
Electron: 39.6.0
ElectronBuildId: 13330601
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
Operating System
Ubuntu 22.04.5 LTS
Terraform Version
Terraform v1.14.5 on linux_arm64
Steps to Reproduce
~> 4.0pinned inversions.tfterraform init(installs v4.52.5)cloudflare_pages_domainresource using thedomainattribute as documented in the installed provider schema:Required attribute "name" not specifiedUnexpected attribute: An attribute named "domain" is not expected hereterraform plan— succeeds with no errorsterraform providers schema -json | python3 -c "import json,sys; s=json.load(sys.stdin); print(list(s['provider_schemas']['registry.terraform.io/cloudflare/cloudflare']['resource_schemas']['cloudflare_pages_domain']['block']['attributes'].keys()))"— outputs['account_id', 'domain', 'id', 'project_name', 'status']Expected Behavior
No errors should be shown. The
domainattribute is valid forcloudflare_pages_domainin the installed provider version (v4.52.5), as confirmed by bothterraform providers schema -jsonand a successfulterraform plan.Actual Behavior
The extension shows two errors on the
cloudflare_pages_domainresource block:Required attribute "name" not specifiedandUnexpected attribute: An attribute named "domain" is not expected here. The errors persist after reloading the window.terraform plansucceeds without errors.Terraform Configuration
Project Structure
. ├── versions.tf └── modules/ └── frontend-site/ ├── main.tf ├── variables.tf └── versions.tfGist
No response
Anything Else?
No other Terraform extensions installed.
Workarounds
None found. Reloading the window does not resolve the issue.
References
None found. The Cloudflare provider docs at https://registry.terraform.io/providers/cloudflare/cloudflare/4.52.5/docs/resources/pages_domain confirm domain as the correct attribute, consistent with what terraform providers schema -json reports locally.
Help Wanted
Community Note