-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vaishak Dinesh
committed
Dec 20, 2024
1 parent
3721d34
commit 5cc721a
Showing
3 changed files
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package api_shield_operation | ||
|
||
func setOperationValues(data *APIShieldOperationModel, env APIShieldOperationResultEnvelope) { | ||
data.Endpoint = (*env.Result)[0].Endpoint | ||
data.Host = (*env.Result)[0].Host | ||
data.Method = (*env.Result)[0].Method | ||
// TODO:: after schema changes land | ||
//data.LastUpdated = (*env.Result)[0].LastUpdated | ||
//data.OperationID = (*env.Result)[0].OperationID | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 10 additions & 7 deletions
17
internal/services/api_shield_operation/testdata/apishieldoperation.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
|
||
resource "cloudflare_api_shield_operation" "%[1]s" { | ||
zone_id = "%[2]s" | ||
method = "%[3]s" | ||
host = "%[4]s" | ||
endpoint = "%[5]s" | ||
} | ||
resource "cloudflare_api_shield_operation" "%[1]s" { | ||
zone_id = "%[2]s" | ||
operations = [ | ||
{ | ||
method = "%[3]s" | ||
host = "%[4]s" | ||
endpoint = "%[5]s" | ||
} | ||
] | ||
} |