Skip to content

Commit

Permalink
Remove quoted type constraints (#1412)
Browse files Browse the repository at this point in the history
Type constraints in quotes was required in Terraform 0.11 and earlier, but that form is now deprecated and will be removed in a future version of Terraform. For example:

variable "control_plane_id" {
  type = "string"
  default = "YOUR_CONTROL_PLANE_ID"
}
should be

variable "control_plane_id" {
  type = string
  default = "YOUR_CONTROL_PLANE_ID"
}
if the quotes are present, an error is shown during terraform apply.
  • Loading branch information
battlebyte authored Oct 10, 2024
1 parent cd165de commit 5f84270
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion kong2tf/builder_default_terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (b *DefaultTerraformBuider) buildControlPlaneVar(controlPlaneID *string) {
cpID = *controlPlaneID
}
b.content += fmt.Sprintf(`variable "control_plane_id" {
type = "string"
type = string
default = "%s"
}`, cpID) + "\n\n"
}
Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/ca-certificate-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/certificate-sni-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/consumer-acl-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/consumer-basic-auth-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/consumer-group-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/consumer-group-plugin-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/consumer-hmac-auth-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/consumer-jwt-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "abc-123"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/consumer-key-auth-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/consumer-no-auth-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/consumer-plugin-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/global-plugin-oidc-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/route-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/route-plugin-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/service-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/service-plugin-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/upstream-target-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down
2 changes: 1 addition & 1 deletion kong2tf/testdata/vault-output-expected.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "control_plane_id" {
type = "string"
type = string
default = "YOUR_CONTROL_PLANE_ID"
}

Expand Down

0 comments on commit 5f84270

Please sign in to comment.