Skip to content

Commit

Permalink
Merge pull request #223 from chenrui333/update-tf-0.12-syntax
Browse files Browse the repository at this point in the history
Update tf 0.12 syntax
  • Loading branch information
Scott McAllister authored May 13, 2020
2 parents 5c4db76 + 098e6bc commit 0e4375e
Show file tree
Hide file tree
Showing 31 changed files with 138 additions and 139 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Terraform Provider for PagerDuty
Requirements
------------

- [Terraform](https://www.terraform.io/downloads.html) 0.10.x
- [Terraform](https://www.terraform.io/downloads.html) 0.12.x
- [Go](https://golang.org/doc/install) 1.11 (to build the provider plugin)

Building The Provider
Expand Down
4 changes: 2 additions & 2 deletions pagerduty/data_source_pagerduty_escalation_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ resource "pagerduty_escalation_policy" "test" {
target {
type = "user_reference"
id = "${pagerduty_user.test.id}"
id = pagerduty_user.test.id
}
}
}
data "pagerduty_escalation_policy" "by_name" {
name = "${pagerduty_escalation_policy.test.name}"
name = pagerduty_escalation_policy.test.name
}
`, username, email, escalationPolicy)
}
4 changes: 2 additions & 2 deletions pagerduty/data_source_pagerduty_schedule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ resource "pagerduty_schedule" "test" {
start = "%s"
rotation_virtual_start = "%s"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.test.id}"]
users = [pagerduty_user.test.id]
restriction {
type = "weekly_restriction"
Expand All @@ -86,7 +86,7 @@ resource "pagerduty_schedule" "test" {
}
data "pagerduty_schedule" "by_name" {
name = "${pagerduty_schedule.test.name}"
name = pagerduty_schedule.test.name
}
`, username, email, schedule, location, start, rotationVirtualStart)
}
6 changes: 3 additions & 3 deletions pagerduty/data_source_pagerduty_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ resource "pagerduty_escalation_policy" "test" {
escalation_delay_in_minutes = 10
target {
type = "user_reference"
id = "${pagerduty_user.test.id}"
id = pagerduty_user.test.id
}
}
}
Expand All @@ -77,12 +77,12 @@ resource "pagerduty_service" "test" {
name = "%s"
auto_resolve_timeout = 14400
acknowledgement_timeout = 600
escalation_policy = "${pagerduty_escalation_policy.test.id}"
escalation_policy = pagerduty_escalation_policy.test.id
alert_creation = "create_incidents"
}
data "pagerduty_service" "by_name" {
name = "${pagerduty_service.test.name}"
name = pagerduty_service.test.name
}
`, username, email, service, escalationPolicy)
}
2 changes: 1 addition & 1 deletion pagerduty/data_source_pagerduty_team_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ resource "pagerduty_team" "test" {
}
data "pagerduty_team" "by_name" {
name = "${pagerduty_team.test.name}"
name = pagerduty_team.test.name
}
`, name, description)
}
2 changes: 1 addition & 1 deletion pagerduty/data_source_pagerduty_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ resource "pagerduty_user" "test" {
}
data "pagerduty_user" "by_email" {
email = "${pagerduty_user.test.email}"
email = pagerduty_user.test.email
}
`, username, email)
}
14 changes: 7 additions & 7 deletions pagerduty/resource_pagerduty_escalation_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ resource "pagerduty_escalation_policy" "foo" {
target {
type = "user_reference"
id = "${pagerduty_user.foo.id}"
id = pagerduty_user.foo.id
}
}
}
Expand Down Expand Up @@ -243,7 +243,7 @@ resource "pagerduty_escalation_policy" "foo" {
target {
type = "user_reference"
id = "${pagerduty_user.foo.id}"
id = pagerduty_user.foo.id
}
}
Expand All @@ -252,7 +252,7 @@ resource "pagerduty_escalation_policy" "foo" {
target {
type = "user_reference"
id = "${pagerduty_user.foo.id}"
id = pagerduty_user.foo.id
}
}
}
Expand All @@ -279,14 +279,14 @@ resource "pagerduty_escalation_policy" "foo" {
name = "%s"
description = "foo"
num_loops = 1
teams = ["${pagerduty_team.foo.id}"]
teams = [pagerduty_team.foo.id]
rule {
escalation_delay_in_minutes = 10
target {
type = "user_reference"
id = "${pagerduty_user.foo.id}"
id = pagerduty_user.foo.id
}
}
}
Expand Down Expand Up @@ -319,7 +319,7 @@ resource "pagerduty_escalation_policy" "foo" {
target {
type = "user_reference"
id = "${pagerduty_user.foo.id}"
id = pagerduty_user.foo.id
}
}
Expand All @@ -328,7 +328,7 @@ resource "pagerduty_escalation_policy" "foo" {
target {
type = "user_reference"
id = "${pagerduty_user.foo.id}"
id = pagerduty_user.foo.id
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions pagerduty/resource_pagerduty_extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ resource "pagerduty_escalation_policy" "foo" {
target {
type = "user_reference"
id = "${pagerduty_user.foo.id}"
id = pagerduty_user.foo.id
}
}
}
Expand All @@ -164,7 +164,7 @@ resource "pagerduty_service" "foo" {
description = "foo"
auto_resolve_timeout = 1800
acknowledgement_timeout = 1800
escalation_policy = "${pagerduty_escalation_policy.foo.id}"
escalation_policy = pagerduty_escalation_policy.foo.id
incident_urgency_rule {
type = "constant"
Expand All @@ -179,8 +179,8 @@ data "pagerduty_extension_schema" "foo" {
resource "pagerduty_extension" "foo"{
name = "%s"
endpoint_url = "%s"
extension_schema = "${data.pagerduty_extension_schema.foo.id}"
extension_objects = ["${pagerduty_service.foo.id}"]
extension_schema = data.pagerduty_extension_schema.foo.id
extension_objects = [pagerduty_service.foo.id]
config = <<EOF
{
"restrict": "%[4]v",
Expand Down
14 changes: 7 additions & 7 deletions pagerduty/resource_pagerduty_maintenance_window_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ resource "pagerduty_escalation_policy" "foo" {
target {
type = "user_reference"
id = "${pagerduty_user.foo.id}"
id = pagerduty_user.foo.id
}
}
}
Expand All @@ -142,7 +142,7 @@ resource "pagerduty_service" "foo" {
description = "foo"
auto_resolve_timeout = 1800
acknowledgement_timeout = 1800
escalation_policy = "${pagerduty_escalation_policy.foo.id}"
escalation_policy = pagerduty_escalation_policy.foo.id
incident_urgency_rule {
type = "constant"
Expand All @@ -154,7 +154,7 @@ resource "pagerduty_maintenance_window" "foo" {
description = "%[1]v"
start_time = "%[2]v"
end_time = "%[3]v"
services = ["${pagerduty_service.foo.id}"]
services = [pagerduty_service.foo.id]
}
`, desc, start, end)
}
Expand All @@ -180,7 +180,7 @@ resource "pagerduty_escalation_policy" "foo" {
target {
type = "user_reference"
id = "${pagerduty_user.foo.id}"
id = pagerduty_user.foo.id
}
}
}
Expand All @@ -190,7 +190,7 @@ resource "pagerduty_service" "foo" {
description = "foo"
auto_resolve_timeout = 1800
acknowledgement_timeout = 1800
escalation_policy = "${pagerduty_escalation_policy.foo.id}"
escalation_policy = pagerduty_escalation_policy.foo.id
incident_urgency_rule {
type = "constant"
Expand All @@ -203,7 +203,7 @@ resource "pagerduty_service" "foo2" {
description = "foo2"
auto_resolve_timeout = 1800
acknowledgement_timeout = 1800
escalation_policy = "${pagerduty_escalation_policy.foo.id}"
escalation_policy = pagerduty_escalation_policy.foo.id
incident_urgency_rule {
type = "constant"
Expand All @@ -215,7 +215,7 @@ resource "pagerduty_maintenance_window" "foo" {
description = "%[1]v"
start_time = "%[2]v"
end_time = "%[3]v"
services = ["${pagerduty_service.foo.id}", "${pagerduty_service.foo2.id}"]
services = [pagerduty_service.foo.id, pagerduty_service.foo2.id]
}
`, desc, start, end)
}
18 changes: 9 additions & 9 deletions pagerduty/resource_pagerduty_schedule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ resource "pagerduty_schedule" "foo" {
start = "%s"
rotation_virtual_start = "%s"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.foo.id}"]
users = [pagerduty_user.foo.id]
restriction {
type = "daily_restriction"
Expand Down Expand Up @@ -371,7 +371,7 @@ resource "pagerduty_schedule" "foo" {
start = "%s"
rotation_virtual_start = "%s"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.foo.id}"]
users = [pagerduty_user.foo.id]
restriction {
type = "daily_restriction"
Expand Down Expand Up @@ -400,7 +400,7 @@ resource "pagerduty_schedule" "foo" {
start = "%s"
rotation_virtual_start = "%s"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.foo.id}"]
users = [pagerduty_user.foo.id]
restriction {
type = "daily_restriction"
Expand Down Expand Up @@ -429,7 +429,7 @@ resource "pagerduty_schedule" "foo" {
start = "%s"
rotation_virtual_start = "%s"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.foo.id}"]
users = [pagerduty_user.foo.id]
restriction {
type = "daily_restriction"
Expand Down Expand Up @@ -459,7 +459,7 @@ resource "pagerduty_schedule" "foo" {
start = "%s"
rotation_virtual_start = "%s"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.foo.id}"]
users = [pagerduty_user.foo.id]
restriction {
type = "weekly_restriction"
Expand Down Expand Up @@ -489,7 +489,7 @@ resource "pagerduty_schedule" "foo" {
start = "%s"
rotation_virtual_start = "%s"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.foo.id}"]
users = [pagerduty_user.foo.id]
restriction {
type = "weekly_restriction"
Expand Down Expand Up @@ -520,7 +520,7 @@ resource "pagerduty_schedule" "foo" {
start = "%[5]v"
rotation_virtual_start = "%[6]v"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.foo.id}"]
users = [pagerduty_user.foo.id]
restriction {
type = "daily_restriction"
Expand All @@ -534,7 +534,7 @@ resource "pagerduty_schedule" "foo" {
start = "%[5]v"
rotation_virtual_start = "%[6]v"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.foo.id}"]
users = [pagerduty_user.foo.id]
restriction {
type = "weekly_restriction"
Expand All @@ -549,7 +549,7 @@ resource "pagerduty_schedule" "foo" {
start = "%[5]v"
rotation_virtual_start = "%[6]v"
rotation_turn_length_seconds = 86400
users = ["${pagerduty_user.foo.id}"]
users = [pagerduty_user.foo.id]
restriction {
type = "weekly_restriction"
Expand Down
Loading

0 comments on commit 0e4375e

Please sign in to comment.