Skip to content

Fix style guides violations in style guides #537

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion content/terraform/v1.10.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
7 changes: 6 additions & 1 deletion content/terraform/v1.11.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
7 changes: 6 additions & 1 deletion content/terraform/v1.12.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
7 changes: 6 additions & 1 deletion content/terraform/v1.2.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
7 changes: 6 additions & 1 deletion content/terraform/v1.3.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
7 changes: 6 additions & 1 deletion content/terraform/v1.4.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
7 changes: 6 additions & 1 deletion content/terraform/v1.6.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
7 changes: 6 additions & 1 deletion content/terraform/v1.7.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
7 changes: 6 additions & 1 deletion content/terraform/v1.8.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
7 changes: 6 additions & 1 deletion content/terraform/v1.9.x/docs/language/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,25 @@ variable "web_instances" {
"metrics"
]
}

resource "aws_instance" "web" {
for_each = toset(var.web_instances)

ami = data.aws_ami.webapp.id
instance_type = "t3.micro"

tags = {
Name = "web_${each.key}"
}
}

output "web_private_ips" {
description = "Private IPs of the web instances"
value = {
for k, v in aws_instance.web : k => v.private_ip
}
}

output "web_ui_public_ip" {
description = "Public IP of the web UI instance"
value = aws_instance.web["ui"].public_ip
Expand Down Expand Up @@ -403,8 +408,8 @@ A common practice to conditionally create resources is to use the `count` meta-a

```hcl
variable "enable_metrics" {
description = "True if the metrics server should be deployed"
type = bool
description = "True if the metrics server should be deployed"
default = true
}

Expand Down
Loading