Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support self.* references in provisioner, connection and lifecycle blocks #859

Closed
6 tasks
Tracked by #495
radeksimko opened this issue Apr 7, 2022 · 1 comment · Fixed by #1115
Closed
6 tasks
Tracked by #495

Support self.* references in provisioner, connection and lifecycle blocks #859

radeksimko opened this issue Apr 7, 2022 · 1 comment · Fixed by #1115
Assignees
Milestone

Comments

@radeksimko
Copy link
Member

radeksimko commented Apr 7, 2022

Background

Terraform supports self. references within provisioner and connection resource blocks, such as

resource "aws_instance" "web" {
  # ...

  provisioner "local-exec" {
    command = "echo The server's IP address is ${self.private_ip}"
  }
}

https://www.terraform.io/language/expressions/references#block-local-values
https://www.terraform.io/language/resources/provisioners/syntax

We don't provide any kind of support for these references and if we were to do any kind of thorough validation of them we'd probably flag them as invalid today.

UX Implications

Completion

Screenshot 2022-06-01 at 15 06 10
Screenshot 2022-06-01 at 15 05 19

Hover

Screenshot 2022-06-01 at 15 06 18
Screenshot 2022-06-01 at 15 05 40

Semantic Highlighting

Screenshot 2022-06-01 at 15 06 56

Proposal

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants