Skip to content

Commit cfe95b4

Browse files
authored
fix: include cloudflare_domain in integration tests (#80)
1 parent 11f27dd commit cfe95b4

File tree

79 files changed

+401
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+401
-11
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
bin/
22
.terraformrc-tf-migrate
33

4+
# Binaries (should be in bin/ directory only)
5+
/tf-migrate
6+
/e2e-runner
7+
48
# Local provider dev overrides
59
.terraformrc-tf-migrate
610

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ lint-testdata:
4141
clean:
4242
@echo "Cleaning build artifacts..."
4343
@rm -rf bin/
44+
@rm -f tf-migrate e2e-runner
4445
@echo "Clean complete"

integration/v4_to_v5/testdata/account_member/expected/account_member.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ variable "cloudflare_zone_id" {
1212
type = string
1313
}
1414

15+
variable "cloudflare_domain" {
16+
description = "Cloudflare domain for testing"
17+
type = string
18+
}
19+
1520
# Test Case 1: Basic account member
1621
resource "cloudflare_account_member" "basic_am" {
1722
account_id = var.cloudflare_account_id
@@ -28,4 +33,4 @@ resource "cloudflare_account_member" "full_am" {
2833
"e58cefd75d7adae0b761796c28815e5c",
2934
"a4154d230e664f8b3e6e5c95a8cc812f"
3035
]
31-
}
36+
}

integration/v4_to_v5/testdata/account_member/input/account_member.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ variable "cloudflare_zone_id" {
1212
type = string
1313
}
1414

15+
variable "cloudflare_domain" {
16+
description = "Cloudflare domain for testing"
17+
type = string
18+
}
19+
1520
# Test Case 1: Basic account member
1621
resource "cloudflare_account_member" "basic_am" {
1722
account_id = var.cloudflare_account_id
@@ -28,4 +33,4 @@ resource "cloudflare_account_member" "full_am" {
2833
"e58cefd75d7adae0b761796c28815e5c",
2934
"a4154d230e664f8b3e6e5c95a8cc812f"
3035
]
31-
}
36+
}

integration/v4_to_v5/testdata/api_token/expected/api_token.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ variable "cloudflare_zone_id" {
1212
type = string
1313
}
1414

15+
variable "cloudflare_domain" {
16+
description = "Cloudflare domain for testing"
17+
type = string
18+
}
19+
1520
# Test Case 1: Basic API token with single policy
1621
resource "cloudflare_api_token" "basic_token" {
1722
name = "${local.name_prefix} Basic API Token"
@@ -268,4 +273,4 @@ resource "cloudflare_api_token" "variable_resources_token" {
268273
id = "c8fed203ed3043cba015a93ad1616f1f"
269274
}]
270275
}]
271-
}
276+
}

integration/v4_to_v5/testdata/api_token/input/api_token.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ variable "cloudflare_zone_id" {
1212
type = string
1313
}
1414

15+
variable "cloudflare_domain" {
16+
description = "Cloudflare domain for testing"
17+
type = string
18+
}
19+
1520
# Test Case 1: Basic API token with single policy
1621
resource "cloudflare_api_token" "basic_token" {
1722
name = "${local.name_prefix} Basic API Token"
@@ -268,4 +273,4 @@ resource "cloudflare_api_token" "variable_resources_token" {
268273
"com.cloudflare.api.account.zone.${var.cloudflare_zone_id}" = "*"
269274
}
270275
}
271-
}
276+
}

integration/v4_to_v5/testdata/argo/expected/argo.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ variable "cloudflare_zone_id" {
88
type = string
99
}
1010

11+
variable "cloudflare_domain" {
12+
description = "Cloudflare domain for testing"
13+
type = string
14+
}
15+
1116
resource "cloudflare_argo_smart_routing" "both_with_lifecycle" {
1217
zone_id = var.cloudflare_zone_id
1318
value = "on"

integration/v4_to_v5/testdata/argo/input/argo.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ variable "cloudflare_zone_id" {
88
type = string
99
}
1010

11+
variable "cloudflare_domain" {
12+
description = "Cloudflare domain for testing"
13+
type = string
14+
}
15+
1116
resource "cloudflare_argo" "both_with_lifecycle" {
1217
zone_id = var.cloudflare_zone_id
1318
smart_routing = "on"

integration/v4_to_v5/testdata/bot_management/expected/bot_management.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ variable "cloudflare_zone_id" {
88
type = string
99
}
1010

11+
variable "cloudflare_domain" {
12+
description = "Cloudflare domain for testing"
13+
type = string
14+
}
15+
1116
# Comprehensive bot management test with available fields
1217
# Note: bot_management is a singleton per zone - only one config per zone
1318
resource "cloudflare_bot_management" "test" {

integration/v4_to_v5/testdata/bot_management/input/bot_management.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ variable "cloudflare_zone_id" {
88
type = string
99
}
1010

11+
variable "cloudflare_domain" {
12+
description = "Cloudflare domain for testing"
13+
type = string
14+
}
15+
1116
# Comprehensive bot management test with available fields
1217
# Note: bot_management is a singleton per zone - only one config per zone
1318
resource "cloudflare_bot_management" "test" {

0 commit comments

Comments
 (0)