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

Connection block values are not checked #6582

Closed
sethvargo opened this issue May 10, 2016 · 1 comment · Fixed by #13400
Closed

Connection block values are not checked #6582

sethvargo opened this issue May 10, 2016 · 1 comment · Fixed by #13400

Comments

@sethvargo
Copy link
Contributor

Terraform Version

v0.16.0

Affected Resource(s)

  • core

Terraform Configuration Files

resource "aws_instance" "example" {
  connection {
    bananananananana = "foo"
  }
}

Expected Behavior

Terraform should have said the key was invalid during the plan phase.

Actual Behavior

Terraform does nothing during plan or apply.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan
@stack72 stack72 added the bug label May 10, 2016
apparentlymart added a commit that referenced this issue Apr 5, 2017
Since the validation of connection blocks is delegated to the communicator
selected by "type", we were not previously doing any validation of the
attribute names in these blocks until running provisioners during apply.

Proper validation here requires us to already have the instance state,
since the final connection info is a merge of values provided in config
with values assigned automatically by the resource. However, we can do
some basic name validation to catch typos during the validation pass, even
though semantic validation and checking for missing attributes will still
wait until the provisioner is instantiated.

This fixes #6582 as much as we reasonably can.
apparentlymart added a commit that referenced this issue Apr 6, 2017
Since the validation of connection blocks is delegated to the communicator
selected by "type", we were not previously doing any validation of the
attribute names in these blocks until running provisioners during apply.

Proper validation here requires us to already have the instance state,
since the final connection info is a merge of values provided in config
with values assigned automatically by the resource. However, we can do
some basic name validation to catch typos during the validation pass, even
though semantic validation and checking for missing attributes will still
wait until the provisioner is instantiated.

This fixes #6582 as much as we reasonably can.
@ghost
Copy link

ghost commented Apr 14, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
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.

3 participants