-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat edge firewall edge function (#112)
* feat: Data source support to Edge Firewall - Edge Functions instance API #minor
- Loading branch information
1 parent
8e99b43
commit 216c3f0
Showing
17 changed files
with
651 additions
and
102 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,99 @@ | ||
name: Code Check and Doc Gen | ||
|
||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
# Ensure the project can build first | ||
build: | ||
name: Build | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- name: Get dependencies | ||
run: | | ||
go mod tidy | ||
git diff --compact-summary --exit-code || \ | ||
(echo; echo "Unexpected difference after 'go mod tidy'. Run 'go mod tidy' command and commit."; exit 1) | ||
- name: Build | ||
run: | | ||
make install | ||
fmt: | ||
name: go fmt | ||
needs: [build] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- run: | | ||
if [ "$(go fmt ./... | wc -l)" -gt 0 ]; then | ||
echo "::error::'go fmt' found required formatting changes. Run 'make fmt' on your branch." | ||
exit 1; | ||
fi | ||
gosec: | ||
name: Run Gosec Security Scanner | ||
needs: [ build ] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
- uses: securego/gosec@master | ||
env: | ||
GOROOT: '' | ||
with: | ||
args: ./... | ||
|
||
vet: | ||
name: go vet | ||
needs: [build] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- run: go vet ./... | ||
|
||
lint: | ||
name: golangcli-lint | ||
needs: [ build ] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Setting GIT | ||
run: git config --global url."https://${{ secrets.GLOBAL_TOKEN }}:[email protected]/aziontech".insteadOf "https://github.com/aziontech" | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
- uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
args: "--config .golintci.yml" | ||
only-new-issues: true | ||
|
||
generate: | ||
name: go generate | ||
needs: [build] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
# Use git add -N . to ensure that new files are listed in the git diff check | ||
- run: | | ||
go generate ./... | ||
git add -N . | ||
git diff --exit-code || \ | ||
(echo; echo "Unexpected difference after code generation. Run 'make generate' command and commit."; exit 1) |
This file was deleted.
Oops, something went wrong.
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
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,50 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "azion_edge_firewall_edge_function_instance Data Source - terraform-provider-azion" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# azion_edge_firewall_edge_function_instance (Data Source) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "azion_edge_firewall_edge_function_instance" "example" { | ||
edge_firewall_id = 1234567890 | ||
results = { | ||
edge_function_instance_id = 123456 | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `edge_firewall_id` (Number) Numeric identifier of the Edge Firewall | ||
- `results` (Attributes) (see [below for nested schema](#nestedatt--results)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Numeric identifier of the data source. | ||
- `schema_version` (Number) Schema Version. | ||
|
||
<a id="nestedatt--results"></a> | ||
### Nested Schema for `results` | ||
|
||
Required: | ||
|
||
- `edge_function_instance_id` (Number) ID of the edge firewall edge functions instance. | ||
|
||
Read-Only: | ||
|
||
- `edge_function_id` (Number) ID of the Edge Function for Edge Firewall you with to configure. | ||
- `json_args` (String) Requisition status code and message. | ||
- `last_editor` (String) Last editor of the edge firewall edge functions instance. | ||
- `last_modified` (String) Last modified timestamp of the edge firewall edge functions instance. | ||
- `name` (String) Name of the edge firewall edge functions instance. |
66 changes: 66 additions & 0 deletions
66
docs/data-sources/edge_firewall_edge_functions_instance.md
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,66 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "azion_edge_firewall_edge_functions_instance Data Source - terraform-provider-azion" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# azion_edge_firewall_edge_functions_instance (Data Source) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "azion_edge_firewall_edge_functions_instance" "example" { | ||
edge_firewall_id = 1234567890 | ||
page = 1 | ||
page_size = 10 | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `edge_firewall_id` (Number) Numeric identifier of the Edge Firewall | ||
|
||
### Optional | ||
|
||
- `page` (Number) The page number of edge firewalls. | ||
- `page_size` (Number) The Page Size number of edge firewalls. | ||
|
||
### Read-Only | ||
|
||
- `counter` (Number) The total number of edge firewalls. | ||
- `id` (String) Numeric identifier of the data source. | ||
- `links` (Attributes) (see [below for nested schema](#nestedatt--links)) | ||
- `results` (Attributes List) (see [below for nested schema](#nestedatt--results)) | ||
- `schema_version` (Number) Schema Version. | ||
- `total_pages` (Number) The total number of pages. | ||
|
||
<a id="nestedatt--links"></a> | ||
### Nested Schema for `links` | ||
|
||
Read-Only: | ||
|
||
- `next` (String) | ||
- `previous` (String) | ||
|
||
|
||
<a id="nestedatt--results"></a> | ||
### Nested Schema for `results` | ||
|
||
Required: | ||
|
||
- `edge_function_instance_id` (Number) ID of the edge firewall edge functions instance. | ||
|
||
Read-Only: | ||
|
||
- `edge_function` (Number) ID of the Edge Function for Edge Firewall you with to configure. | ||
- `json_args` (String) Requisition status code and message. | ||
- `last_editor` (String) Last editor of the edge firewall edge functions instance. | ||
- `last_modified` (String) Last modified timestamp of the edge firewall edge functions instance. | ||
- `name` (String) Name of the edge firewall edge functions instance. |
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
6 changes: 6 additions & 0 deletions
6
examples/data-sources/azion_edge_firewall_edge_function_instance/data-source.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
data "azion_edge_firewall_edge_function_instance" "example" { | ||
edge_firewall_id = 1234567890 | ||
results = { | ||
edge_function_instance_id = 123456 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
examples/data-sources/azion_edge_firewall_edge_functions_instance/data-source.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
data "azion_edge_firewall_edge_functions_instance" "example" { | ||
edge_firewall_id = 1234567890 | ||
page = 1 | ||
page_size = 10 | ||
} |
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
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
Oops, something went wrong.