`Unresolved reference arn` for `arn` member in `aws_codeartifact_domain` and `aws_codeartifact_repository` objects
See original GitHub issuePrerequisites
- Ensure you have latest version of plugin installed
- Search for possible issue duplicates
Installation details
- IDE version (
Help->About->Copy to Clipboard
)
WebStorm 2020.3.2
Build #WS-203.7148.54, built on January 25, 2021
Runtime version: 11.0.9.1+11-b1145.77 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1953M
Cores: 8
Registry: ide.intellij.laf.enable.animation=true, ide.balloon.shadow.size=0
Non-Bundled Plugins: com.mallowigi.idea, org.intellij.plugins.hcl
- intellij-hcl plugin version (
Settings->Plugins
)
HashiCorp Terraform / HCL language Support
0.7.10
- Terraform version (
terraform -v
)
Terraform v0.14.5
+ provider registry.terraform.io/hashicorp/aws v3.25.0
Terraform Configuration Files
# Make a codeartifact domain and attach a repository to it
resource "aws_codeartifact_domain" "a_certain_code_domain" {
domain = "a-certain-code-domain"
}
resource "aws_codeartifact_repository" "a_certain_code_repository" {
repository = "a-certain-code-repository"
domain = aws_codeartifact_domain.a_certain_code_domain.domain
}
# Now try to use the arn of the above generated resources, for instance for a iam policy
resource "aws_iam_policy" "a_certain_attached_policy" {
name = "CodeBuildBasePolicyForACertainModule"
policy = jsonencode(
{
Version: "2012-10-17",
Statement: [
{
Effect: "Allow",
Action: [
"codeartifact:GetAuthorizationToken",
"codeartifact:GetRepositoryEndpoint",
]
Resource: [
aws_codeartifact_domain.a_certain_code_domain.arn, # [!] Unresolved reference arn
aws_codeartifact_repository.a_certain_code_repository.arn # [!] Unresolved reference arn
]
}
]
})
}
Exception
None
Expected Behavior
- What should have happened?
aws_codeartifact_domain
andaws_codeartifact_repository
objects provide correctly their members information for correct code highlighting
Actual Behavior
What actually happened?
HCL language support plugin prompts an error Unresolved reference arn
for arn
member in aws_codeartifact_domain
and aws_codeartifact_repository
objects even when the configuration is totally valid
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Setup a new project with the above terraform configuration
- Check code static analysis from HCL language support plugin, 2 errors prompted
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in 0.7.11
@VladRassokhin Thanks.