Skip to content

Commit 12aeddc

Browse files
authored
feat: Shorten outputs (removing this_) (#53)
1 parent 3d3f3ba commit 12aeddc

File tree

5 files changed

+66
-66
lines changed

5 files changed

+66
-66
lines changed

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ These types of resources are supported:
1010

1111
## Terraform versions
1212

13-
Terraform 0.12 or newer. Pin module version to `~> v2.0`. Submit pull-requests to `master` branch.
13+
Terraform 0.12 or newer. Pin module version to `~> v2.0` or newer. Submit pull-requests to `master` branch.
1414

1515
Terraform 0.11. Pin module version to `~> v1.0`. Submit pull-requests to `terraform011` branch.
1616

@@ -19,7 +19,7 @@ Terraform 0.11. Pin module version to `~> v1.0`. Submit pull-requests to `terraf
1919
```hcl
2020
module "redshift" {
2121
source = "terraform-aws-modules/redshift/aws"
22-
version = "~> 2.0"
22+
version = "~> 3.0"
2323
2424
cluster_identifier = "my-cluster"
2525
cluster_node_type = "dc1.large"
@@ -116,28 +116,28 @@ No modules.
116116

117117
| Name | Description |
118118
|------|-------------|
119-
| <a name="output_this_redshift_cluster_arn"></a> [this\_redshift\_cluster\_arn](#output\_this\_redshift\_cluster\_arn) | The Redshift cluster ARN |
120-
| <a name="output_this_redshift_cluster_automated_snapshot_retention_period"></a> [this\_redshift\_cluster\_automated\_snapshot\_retention\_period](#output\_this\_redshift\_cluster\_automated\_snapshot\_retention\_period) | The backup retention period |
121-
| <a name="output_this_redshift_cluster_availability_zone"></a> [this\_redshift\_cluster\_availability\_zone](#output\_this\_redshift\_cluster\_availability\_zone) | The availability zone of the Cluster |
122-
| <a name="output_this_redshift_cluster_database_name"></a> [this\_redshift\_cluster\_database\_name](#output\_this\_redshift\_cluster\_database\_name) | The name of the default database in the Cluster |
123-
| <a name="output_this_redshift_cluster_encrypted"></a> [this\_redshift\_cluster\_encrypted](#output\_this\_redshift\_cluster\_encrypted) | Whether the data in the cluster is encrypted |
124-
| <a name="output_this_redshift_cluster_endpoint"></a> [this\_redshift\_cluster\_endpoint](#output\_this\_redshift\_cluster\_endpoint) | The connection endpoint |
125-
| <a name="output_this_redshift_cluster_hostname"></a> [this\_redshift\_cluster\_hostname](#output\_this\_redshift\_cluster\_hostname) | The hostname of the Redshift cluster |
126-
| <a name="output_this_redshift_cluster_id"></a> [this\_redshift\_cluster\_id](#output\_this\_redshift\_cluster\_id) | The Redshift cluster ID |
127-
| <a name="output_this_redshift_cluster_identifier"></a> [this\_redshift\_cluster\_identifier](#output\_this\_redshift\_cluster\_identifier) | The Redshift cluster identifier |
128-
| <a name="output_this_redshift_cluster_node_type"></a> [this\_redshift\_cluster\_node\_type](#output\_this\_redshift\_cluster\_node\_type) | The type of nodes in the cluster |
129-
| <a name="output_this_redshift_cluster_parameter_group_name"></a> [this\_redshift\_cluster\_parameter\_group\_name](#output\_this\_redshift\_cluster\_parameter\_group\_name) | The name of the parameter group to be associated with this cluster |
130-
| <a name="output_this_redshift_cluster_port"></a> [this\_redshift\_cluster\_port](#output\_this\_redshift\_cluster\_port) | The port the cluster responds on |
131-
| <a name="output_this_redshift_cluster_preferred_maintenance_window"></a> [this\_redshift\_cluster\_preferred\_maintenance\_window](#output\_this\_redshift\_cluster\_preferred\_maintenance\_window) | The backup window |
132-
| <a name="output_this_redshift_cluster_public_key"></a> [this\_redshift\_cluster\_public\_key](#output\_this\_redshift\_cluster\_public\_key) | The public key for the cluster |
133-
| <a name="output_this_redshift_cluster_revision_number"></a> [this\_redshift\_cluster\_revision\_number](#output\_this\_redshift\_cluster\_revision\_number) | The specific revision number of the database in the cluster |
134-
| <a name="output_this_redshift_cluster_security_groups"></a> [this\_redshift\_cluster\_security\_groups](#output\_this\_redshift\_cluster\_security\_groups) | The security groups associated with the cluster |
135-
| <a name="output_this_redshift_cluster_subnet_group_name"></a> [this\_redshift\_cluster\_subnet\_group\_name](#output\_this\_redshift\_cluster\_subnet\_group\_name) | The name of a cluster subnet group to be associated with this cluster |
136-
| <a name="output_this_redshift_cluster_type"></a> [this\_redshift\_cluster\_type](#output\_this\_redshift\_cluster\_type) | The Redshift cluster type |
137-
| <a name="output_this_redshift_cluster_version"></a> [this\_redshift\_cluster\_version](#output\_this\_redshift\_cluster\_version) | The version of Redshift engine software |
138-
| <a name="output_this_redshift_cluster_vpc_security_group_ids"></a> [this\_redshift\_cluster\_vpc\_security\_group\_ids](#output\_this\_redshift\_cluster\_vpc\_security\_group\_ids) | The VPC security group ids associated with the cluster |
139-
| <a name="output_this_redshift_parameter_group_id"></a> [this\_redshift\_parameter\_group\_id](#output\_this\_redshift\_parameter\_group\_id) | The ID of Redshift parameter group created by this module |
140-
| <a name="output_this_redshift_subnet_group_id"></a> [this\_redshift\_subnet\_group\_id](#output\_this\_redshift\_subnet\_group\_id) | The ID of Redshift subnet group created by this module |
119+
| <a name="output_redshift_cluster_arn"></a> [redshift\_cluster\_arn](#output\_redshift\_cluster\_arn) | The Redshift cluster ARN |
120+
| <a name="output_redshift_cluster_automated_snapshot_retention_period"></a> [redshift\_cluster\_automated\_snapshot\_retention\_period](#output\_redshift\_cluster\_automated\_snapshot\_retention\_period) | The backup retention period |
121+
| <a name="output_redshift_cluster_availability_zone"></a> [redshift\_cluster\_availability\_zone](#output\_redshift\_cluster\_availability\_zone) | The availability zone of the Cluster |
122+
| <a name="output_redshift_cluster_database_name"></a> [redshift\_cluster\_database\_name](#output\_redshift\_cluster\_database\_name) | The name of the default database in the Cluster |
123+
| <a name="output_redshift_cluster_encrypted"></a> [redshift\_cluster\_encrypted](#output\_redshift\_cluster\_encrypted) | Whether the data in the cluster is encrypted |
124+
| <a name="output_redshift_cluster_endpoint"></a> [redshift\_cluster\_endpoint](#output\_redshift\_cluster\_endpoint) | The connection endpoint |
125+
| <a name="output_redshift_cluster_hostname"></a> [redshift\_cluster\_hostname](#output\_redshift\_cluster\_hostname) | The hostname of the Redshift cluster |
126+
| <a name="output_redshift_cluster_id"></a> [redshift\_cluster\_id](#output\_redshift\_cluster\_id) | The Redshift cluster ID |
127+
| <a name="output_redshift_cluster_identifier"></a> [redshift\_cluster\_identifier](#output\_redshift\_cluster\_identifier) | The Redshift cluster identifier |
128+
| <a name="output_redshift_cluster_node_type"></a> [redshift\_cluster\_node\_type](#output\_redshift\_cluster\_node\_type) | The type of nodes in the cluster |
129+
| <a name="output_redshift_cluster_parameter_group_name"></a> [redshift\_cluster\_parameter\_group\_name](#output\_redshift\_cluster\_parameter\_group\_name) | The name of the parameter group to be associated with this cluster |
130+
| <a name="output_redshift_cluster_port"></a> [redshift\_cluster\_port](#output\_redshift\_cluster\_port) | The port the cluster responds on |
131+
| <a name="output_redshift_cluster_preferred_maintenance_window"></a> [redshift\_cluster\_preferred\_maintenance\_window](#output\_redshift\_cluster\_preferred\_maintenance\_window) | The backup window |
132+
| <a name="output_redshift_cluster_public_key"></a> [redshift\_cluster\_public\_key](#output\_redshift\_cluster\_public\_key) | The public key for the cluster |
133+
| <a name="output_redshift_cluster_revision_number"></a> [redshift\_cluster\_revision\_number](#output\_redshift\_cluster\_revision\_number) | The specific revision number of the database in the cluster |
134+
| <a name="output_redshift_cluster_security_groups"></a> [redshift\_cluster\_security\_groups](#output\_redshift\_cluster\_security\_groups) | The security groups associated with the cluster |
135+
| <a name="output_redshift_cluster_subnet_group_name"></a> [redshift\_cluster\_subnet\_group\_name](#output\_redshift\_cluster\_subnet\_group\_name) | The name of a cluster subnet group to be associated with this cluster |
136+
| <a name="output_redshift_cluster_type"></a> [redshift\_cluster\_type](#output\_redshift\_cluster\_type) | The Redshift cluster type |
137+
| <a name="output_redshift_cluster_version"></a> [redshift\_cluster\_version](#output\_redshift\_cluster\_version) | The version of Redshift engine software |
138+
| <a name="output_redshift_cluster_vpc_security_group_ids"></a> [redshift\_cluster\_vpc\_security\_group\_ids](#output\_redshift\_cluster\_vpc\_security\_group\_ids) | The VPC security group ids associated with the cluster |
139+
| <a name="output_redshift_parameter_group_id"></a> [redshift\_parameter\_group\_id](#output\_redshift\_parameter\_group\_id) | The ID of Redshift parameter group created by this module |
140+
| <a name="output_redshift_subnet_group_id"></a> [redshift\_subnet\_group\_id](#output\_redshift\_subnet\_group\_id) | The ID of Redshift subnet group created by this module |
141141
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
142142

143143
## Authors

examples/complete/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ No providers.
3131
| Name | Source | Version |
3232
|------|--------|---------|
3333
| <a name="module_redshift"></a> [redshift](#module\_redshift) | ../../ | |
34-
| <a name="module_sg"></a> [sg](#module\_sg) | terraform-aws-modules/security-group/aws//modules/redshift | ~> 3.0 |
35-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 2.0 |
34+
| <a name="module_sg"></a> [sg](#module\_sg) | terraform-aws-modules/security-group/aws//modules/redshift | ~> 4.0 |
35+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.0 |
3636

3737
## Resources
3838

@@ -46,10 +46,10 @@ No inputs.
4646

4747
| Name | Description |
4848
|------|-------------|
49-
| <a name="output_this_redshift_cluster_endpoint"></a> [this\_redshift\_cluster\_endpoint](#output\_this\_redshift\_cluster\_endpoint) | Redshift endpoint |
50-
| <a name="output_this_redshift_cluster_hostname"></a> [this\_redshift\_cluster\_hostname](#output\_this\_redshift\_cluster\_hostname) | Redshift hostname |
51-
| <a name="output_this_redshift_cluster_id"></a> [this\_redshift\_cluster\_id](#output\_this\_redshift\_cluster\_id) | The availability zone of the RDS instance |
52-
| <a name="output_this_redshift_cluster_port"></a> [this\_redshift\_cluster\_port](#output\_this\_redshift\_cluster\_port) | Redshift port |
53-
| <a name="output_this_security_group_id"></a> [this\_security\_group\_id](#output\_this\_security\_group\_id) | The ID of the security group |
49+
| <a name="output_redshift_cluster_endpoint"></a> [redshift\_cluster\_endpoint](#output\_redshift\_cluster\_endpoint) | Redshift endpoint |
50+
| <a name="output_redshift_cluster_hostname"></a> [redshift\_cluster\_hostname](#output\_redshift\_cluster\_hostname) | Redshift hostname |
51+
| <a name="output_redshift_cluster_id"></a> [redshift\_cluster\_id](#output\_redshift\_cluster\_id) | The availability zone of the RDS instance |
52+
| <a name="output_redshift_cluster_port"></a> [redshift\_cluster\_port](#output\_redshift\_cluster\_port) | Redshift port |
53+
| <a name="output_security_group_id"></a> [security\_group\_id](#output\_security\_group\_id) | The ID of the security group |
5454
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC |
5555
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/complete/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ provider "aws" {
77
######
88
module "vpc" {
99
source = "terraform-aws-modules/vpc/aws"
10-
version = "~> 2.0"
10+
version = "~> 3.0"
1111

1212
name = "demo-vpc"
1313

@@ -22,7 +22,7 @@ module "vpc" {
2222
###########################
2323
module "sg" {
2424
source = "terraform-aws-modules/security-group/aws//modules/redshift"
25-
version = "~> 3.0"
25+
version = "~> 4.0"
2626

2727
name = "demo-redshift"
2828
vpc_id = module.vpc.vpc_id
@@ -49,7 +49,7 @@ module "redshift" {
4949
cluster_master_password = "MySecretPassw0rd"
5050

5151
subnets = module.vpc.redshift_subnets
52-
vpc_security_group_ids = [module.sg.this_security_group_id]
52+
vpc_security_group_ids = [module.sg.security_group_id]
5353

5454
# redshift_subnet_group_name = module.vpc.redshift_subnet_group
5555
}

examples/complete/outputs.tf

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ output "vpc_id" {
33
value = module.vpc.vpc_id
44
}
55

6-
output "this_security_group_id" {
6+
output "security_group_id" {
77
description = "The ID of the security group"
8-
value = module.sg.this_security_group_id
8+
value = module.sg.security_group_id
99
}
1010

11-
output "this_redshift_cluster_id" {
11+
output "redshift_cluster_id" {
1212
description = "The availability zone of the RDS instance"
13-
value = module.redshift.this_redshift_cluster_id
13+
value = module.redshift.redshift_cluster_id
1414
}
1515

16-
output "this_redshift_cluster_endpoint" {
16+
output "redshift_cluster_endpoint" {
1717
description = "Redshift endpoint"
18-
value = module.redshift.this_redshift_cluster_endpoint
18+
value = module.redshift.redshift_cluster_endpoint
1919
}
2020

21-
output "this_redshift_cluster_hostname" {
21+
output "redshift_cluster_hostname" {
2222
description = "Redshift hostname"
23-
value = module.redshift.this_redshift_cluster_hostname
23+
value = module.redshift.redshift_cluster_hostname
2424
}
2525

26-
output "this_redshift_cluster_port" {
26+
output "redshift_cluster_port" {
2727
description = "Redshift port"
28-
value = module.redshift.this_redshift_cluster_port
28+
value = module.redshift.redshift_cluster_port
2929
}

outputs.tf

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
output "this_redshift_cluster_arn" {
1+
output "redshift_cluster_arn" {
22
description = "The Redshift cluster ARN"
33
value = aws_redshift_cluster.this.arn
44
}
55

6-
output "this_redshift_cluster_id" {
6+
output "redshift_cluster_id" {
77
description = "The Redshift cluster ID"
88
value = aws_redshift_cluster.this.id
99
}
1010

11-
output "this_redshift_cluster_identifier" {
11+
output "redshift_cluster_identifier" {
1212
description = "The Redshift cluster identifier"
1313
value = aws_redshift_cluster.this.cluster_identifier
1414
}
1515

16-
output "this_redshift_cluster_type" {
16+
output "redshift_cluster_type" {
1717
description = "The Redshift cluster type"
1818
value = aws_redshift_cluster.this.cluster_type
1919
}
2020

21-
output "this_redshift_cluster_node_type" {
21+
output "redshift_cluster_node_type" {
2222
description = "The type of nodes in the cluster"
2323
value = aws_redshift_cluster.this.node_type
2424
}
2525

26-
output "this_redshift_cluster_database_name" {
26+
output "redshift_cluster_database_name" {
2727
description = "The name of the default database in the Cluster"
2828
value = aws_redshift_cluster.this.database_name
2929
}
3030

31-
output "this_redshift_cluster_availability_zone" {
31+
output "redshift_cluster_availability_zone" {
3232
description = "The availability zone of the Cluster"
3333
value = aws_redshift_cluster.this.availability_zone
3434
}
3535

36-
output "this_redshift_cluster_automated_snapshot_retention_period" {
36+
output "redshift_cluster_automated_snapshot_retention_period" {
3737
description = "The backup retention period"
3838
value = aws_redshift_cluster.this.automated_snapshot_retention_period
3939
}
4040

41-
output "this_redshift_cluster_preferred_maintenance_window" {
41+
output "redshift_cluster_preferred_maintenance_window" {
4242
description = "The backup window"
4343
value = aws_redshift_cluster.this.preferred_maintenance_window
4444
}
4545

46-
output "this_redshift_cluster_endpoint" {
46+
output "redshift_cluster_endpoint" {
4747
description = "The connection endpoint"
4848
value = aws_redshift_cluster.this.endpoint
4949
}
5050

51-
output "this_redshift_cluster_hostname" {
51+
output "redshift_cluster_hostname" {
5252
description = "The hostname of the Redshift cluster"
5353
value = replace(
5454
aws_redshift_cluster.this.endpoint,
@@ -57,57 +57,57 @@ output "this_redshift_cluster_hostname" {
5757
)
5858
}
5959

60-
output "this_redshift_cluster_encrypted" {
60+
output "redshift_cluster_encrypted" {
6161
description = "Whether the data in the cluster is encrypted"
6262
value = aws_redshift_cluster.this.encrypted
6363
}
6464

65-
output "this_redshift_cluster_security_groups" {
65+
output "redshift_cluster_security_groups" {
6666
description = "The security groups associated with the cluster"
6767
value = aws_redshift_cluster.this.cluster_security_groups
6868
}
6969

70-
output "this_redshift_cluster_vpc_security_group_ids" {
70+
output "redshift_cluster_vpc_security_group_ids" {
7171
description = "The VPC security group ids associated with the cluster"
7272
value = aws_redshift_cluster.this.vpc_security_group_ids
7373
}
7474

75-
output "this_redshift_cluster_port" {
75+
output "redshift_cluster_port" {
7676
description = "The port the cluster responds on"
7777
value = aws_redshift_cluster.this.port
7878
}
7979

80-
output "this_redshift_cluster_version" {
80+
output "redshift_cluster_version" {
8181
description = "The version of Redshift engine software"
8282
value = aws_redshift_cluster.this.cluster_version
8383
}
8484

85-
output "this_redshift_cluster_parameter_group_name" {
85+
output "redshift_cluster_parameter_group_name" {
8686
description = "The name of the parameter group to be associated with this cluster"
8787
value = aws_redshift_cluster.this.cluster_parameter_group_name
8888
}
8989

90-
output "this_redshift_cluster_subnet_group_name" {
90+
output "redshift_cluster_subnet_group_name" {
9191
description = "The name of a cluster subnet group to be associated with this cluster"
9292
value = aws_redshift_cluster.this.cluster_subnet_group_name
9393
}
9494

95-
output "this_redshift_cluster_public_key" {
95+
output "redshift_cluster_public_key" {
9696
description = "The public key for the cluster"
9797
value = aws_redshift_cluster.this.cluster_public_key
9898
}
9999

100-
output "this_redshift_cluster_revision_number" {
100+
output "redshift_cluster_revision_number" {
101101
description = "The specific revision number of the database in the cluster"
102102
value = aws_redshift_cluster.this.cluster_revision_number
103103
}
104104

105-
output "this_redshift_subnet_group_id" {
105+
output "redshift_subnet_group_id" {
106106
description = "The ID of Redshift subnet group created by this module"
107107
value = element(concat(aws_redshift_subnet_group.this.*.id, [""]), 0)
108108
}
109109

110-
output "this_redshift_parameter_group_id" {
110+
output "redshift_parameter_group_id" {
111111
description = "The ID of Redshift parameter group created by this module"
112112
value = element(concat(aws_redshift_parameter_group.this.*.id, [""]), 0)
113113
}

0 commit comments

Comments
 (0)