Skip to content

Commit

Permalink
Remove Interpolation-only expressions from website/docs files (#36065)
Browse files Browse the repository at this point in the history
* Remove Interpolation-only expressions from website/docs files

Interpolation-only expressions are deprecated in Terraform v0.12.14
See. https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.10.0/docs/rules/terraform_deprecated_interpolation.md

* Revert whitespace trimming at the end of lines

* Preserve interpolation-only expressions for JSON

* Preserve interpolation-only expressions for < 0.11 samples

* Remove Interpolation-only expressions from website/docs files
  • Loading branch information
nimzo6689 authored Nov 21, 2024
1 parent 291c1ad commit b4a634c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions website/docs/cli/commands/import.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ variable "access_key" {}
variable "secret_key" {}
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
access_key = var.access_key
secret_key = var.secret_key
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/language/backend/s3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ provider "aws" {
# environment or the global credentials file.
assume_role = {
role_arn = "${var.workspace_iam_roles[terraform.workspace]}"
role_arn = var.workspace_iam_roles[terraform.workspace]
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion website/docs/language/expressions/dynamic-blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ special `dynamic` block type, which is supported inside `resource`, `data`,
```hcl
resource "aws_elastic_beanstalk_environment" "tfenvtest" {
name = "tf-test-name"
application = "${aws_elastic_beanstalk_application.tftest.name}"
application = aws_elastic_beanstalk_application.tftest.name
solution_stack_name = "64bit Amazon Linux 2018.03 v2.11.4 running Go 1.12.6"
dynamic "setting" {
Expand Down
4 changes: 2 additions & 2 deletions website/docs/language/modules/develop/providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,15 @@ provider "aws" {
provider "google" {
alias = "usw1"
credentials = "${file("account.json")}"
credentials = file("account.json")
project = "my-project-id"
region = "us-west1"
zone = "us-west1-a"
}
provider "google" {
alias = "usw2"
credentials = "${file("account.json")}"
credentials = file("account.json")
project = "my-project-id"
region = "us-west2"
zone = "us-west2-a"
Expand Down
8 changes: 4 additions & 4 deletions website/docs/language/resources/provisioners/connection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ provisioner "file" {
connection {
type = "ssh"
user = "root"
password = "${var.root_password}"
host = "${var.host}"
password = var.root_password
host = var.host
}
}
Expand All @@ -72,8 +72,8 @@ provisioner "file" {
connection {
type = "winrm"
user = "Administrator"
password = "${var.admin_password}"
host = "${var.host}"
password = var.admin_password
host = var.host
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion website/docs/language/state/workspaces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ to spin up smaller cluster sizes. For example:

```hcl
resource "aws_instance" "example" {
count = "${terraform.workspace == "default" ? 5 : 1}"
count = terraform.workspace == "default" ? 5 : 1
# ... other arguments
}
Expand Down

0 comments on commit b4a634c

Please sign in to comment.