Skip to content

Commit e72362c

Browse files
Merge pull request #896 from cloudflare/vaishak/finishing-touches
chore: release prep
2 parents 7366db5 + d0278c6 commit e72362c

File tree

15 files changed

+888
-836
lines changed

15 files changed

+888
-836
lines changed

.github/workflows/test.yaml

Lines changed: 94 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,103 @@ jobs:
3333
uses: hashicorp/setup-terraform@v3
3434
- name: write Terraform configuration
3535
run: |
36-
cat > main.tf <<EOF
37-
terraform {
38-
required_providers {
39-
cloudflare = {
40-
source = "cloudflare/cloudflare"
41-
version = "~> 4"
42-
}
36+
cat > main.tf <<EOF
37+
terraform {
38+
required_providers {
39+
cloudflare = {
40+
source = "cloudflare/cloudflare"
41+
version = "~> 4"
4342
}
4443
}
45-
EOF
44+
}
45+
EOF
4646
- name: terraform init
4747
run: terraform init
4848
- name: go test
4949
env:
50-
CLOUDFLARE_EMAIL: [email protected]
51-
CLOUDFLARE_API_KEY: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
52-
CLOUDFLARE_TERRAFORM_INSTALL_PATH: ${{ github.workspace }}
53-
run: make test
50+
CLOUDFLARE_EMAIL: [email protected]
51+
CLOUDFLARE_API_KEY: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
52+
CLOUDFLARE_TERRAFORM_INSTALL_PATH: ${{ github.workspace }}
53+
run: TESTARGS="-run=V4" make test
54+
55+
test-v5-generate:
56+
name: Go + Terraform v5 (Generate)
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: checkout
60+
uses: actions/checkout@v4
61+
with:
62+
fetch-depth: 0
63+
- name: install go
64+
uses: actions/setup-go@v5
65+
with:
66+
go-version-file: 'go.mod'
67+
- uses: actions/cache@v4
68+
with:
69+
path: ~/go/pkg/mod
70+
key: go1.20-${{ hashFiles('**/go.sum') }}
71+
- name: Vet
72+
run: go vet ./...
73+
- name: setup Terraform
74+
uses: hashicorp/setup-terraform@v3
75+
- name: write Terraform configuration for v5
76+
run: |
77+
cat > main.tf <<EOF
78+
terraform {
79+
required_providers {
80+
cloudflare = {
81+
source = "cloudflare/cloudflare"
82+
version = "~> 5"
83+
}
84+
}
85+
}
86+
EOF
87+
- name: terraform init
88+
run: terraform init
89+
- name: go test generate
90+
env:
91+
CLOUDFLARE_EMAIL: [email protected]
92+
CLOUDFLARE_API_KEY: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
93+
CLOUDFLARE_TERRAFORM_INSTALL_PATH: ${{ github.workspace }}
94+
run: TESTARGS="-run=^TestResourceGenerationV5" make test
95+
96+
test-v5-import:
97+
name: Go + Terraform v5 (Import)
98+
runs-on: ubuntu-latest
99+
steps:
100+
- name: checkout
101+
uses: actions/checkout@v4
102+
with:
103+
fetch-depth: 0
104+
- name: install go
105+
uses: actions/setup-go@v5
106+
with:
107+
go-version-file: 'go.mod'
108+
- uses: actions/cache@v4
109+
with:
110+
path: ~/go/pkg/mod
111+
key: go1.20-${{ hashFiles('**/go.sum') }}
112+
- name: Vet
113+
run: go vet ./...
114+
- name: setup Terraform
115+
uses: hashicorp/setup-terraform@v3
116+
- name: write Terraform configuration for v5
117+
run: |
118+
cat > main.tf <<EOF
119+
terraform {
120+
required_providers {
121+
cloudflare = {
122+
source = "cloudflare/cloudflare"
123+
version = "~> 5"
124+
}
125+
}
126+
}
127+
EOF
128+
- name: terraform init
129+
run: terraform init
130+
- name: go test import
131+
env:
132+
CLOUDFLARE_EMAIL: [email protected]
133+
CLOUDFLARE_API_KEY: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
134+
CLOUDFLARE_TERRAFORM_INSTALL_PATH: ${{ github.workspace }}
135+
run: TESTARGS="-run=^TestResourceImportV5" make test

.github/workflows/validate.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,14 @@ jobs:
2121
uses: hashicorp/setup-terraform@v3
2222
- name: validate generated terraform configuration
2323
run: make validate-tf
24+
25+
validate-v5:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: checkout
29+
uses: actions/checkout@v4
30+
- name: setup Terraform
31+
uses: hashicorp/setup-terraform@v3
32+
- name: validate generated terraform configuration
33+
run: make validate-tf-v5
34+

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ fmt:
3333
validate-tf:
3434
@bash scripts/validate-tf.sh
3535

36-
.PHONY: build test fmt validate-tf
36+
validate-tf-v5:
37+
@bash scripts/validate-tf-v5.sh
38+
39+
.PHONY: build test fmt validate-tf validate-tf-v5

README.md

Lines changed: 233 additions & 16 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)