-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use API integration from SDK (#2429)
- Removed old api integration implementation from resource. - Migrated tests and added more. - Added not listed in docs ALTER options (`SET AZURE_TENANT_ID` and `SET GOOGLE_AUDIENCE`) to the SDK. Added tests.
- Loading branch information
1 parent
119af5e
commit 1ccc864
Showing
23 changed files
with
793 additions
and
383 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
pkg/resources/testdata/TestAcc_ApiIntegration_aws/1/test.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,10 @@ | ||
resource "snowflake_api_integration" "test_aws_int" { | ||
name = var.name | ||
api_provider = var.api_provider | ||
api_aws_role_arn = var.api_aws_role_arn | ||
api_allowed_prefixes = var.api_allowed_prefixes | ||
api_blocked_prefixes = var.api_blocked_prefixes | ||
api_key = var.api_key | ||
comment = var.comment | ||
enabled = var.enabled | ||
} |
32 changes: 32 additions & 0 deletions
32
pkg/resources/testdata/TestAcc_ApiIntegration_aws/1/variables.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,32 @@ | ||
variable "name" { | ||
type = string | ||
} | ||
|
||
variable "api_provider" { | ||
type = string | ||
} | ||
|
||
variable "api_aws_role_arn" { | ||
type = string | ||
} | ||
|
||
variable "api_allowed_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "api_blocked_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "api_key" { | ||
type = string | ||
} | ||
|
||
variable "comment" { | ||
type = string | ||
} | ||
|
||
variable "enabled" { | ||
type = bool | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
pkg/resources/testdata/TestAcc_ApiIntegration_azure/1/test.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,11 @@ | ||
resource "snowflake_api_integration" "test_azure_int" { | ||
name = var.name | ||
api_provider = "azure_api_management" | ||
azure_tenant_id = var.azure_tenant_id | ||
azure_ad_application_id = var.azure_ad_application_id | ||
api_allowed_prefixes = var.api_allowed_prefixes | ||
api_blocked_prefixes = var.api_blocked_prefixes | ||
api_key = var.api_key | ||
comment = var.comment | ||
enabled = var.enabled | ||
} |
31 changes: 31 additions & 0 deletions
31
pkg/resources/testdata/TestAcc_ApiIntegration_azure/1/variables.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,31 @@ | ||
variable "name" { | ||
type = string | ||
} | ||
|
||
variable "azure_tenant_id" { | ||
type = string | ||
} | ||
|
||
variable "azure_ad_application_id" { | ||
type = string | ||
} | ||
|
||
variable "api_allowed_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "api_blocked_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "api_key" { | ||
type = string | ||
} | ||
|
||
variable "comment" { | ||
type = string | ||
} | ||
|
||
variable "enabled" { | ||
type = bool | ||
} |
10 changes: 10 additions & 0 deletions
10
pkg/resources/testdata/TestAcc_ApiIntegration_changeApiProvider/1/test.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,10 @@ | ||
resource "snowflake_api_integration" "test_change" { | ||
name = var.name | ||
api_provider = var.api_provider | ||
api_aws_role_arn = var.api_aws_role_arn | ||
api_allowed_prefixes = var.api_allowed_prefixes | ||
api_blocked_prefixes = var.api_blocked_prefixes | ||
api_key = var.api_key | ||
comment = var.comment | ||
enabled = var.enabled | ||
} |
32 changes: 32 additions & 0 deletions
32
pkg/resources/testdata/TestAcc_ApiIntegration_changeApiProvider/1/variables.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,32 @@ | ||
variable "name" { | ||
type = string | ||
} | ||
|
||
variable "api_provider" { | ||
type = string | ||
} | ||
|
||
variable "api_aws_role_arn" { | ||
type = string | ||
} | ||
|
||
variable "api_allowed_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "api_blocked_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "api_key" { | ||
type = string | ||
} | ||
|
||
variable "comment" { | ||
type = string | ||
} | ||
|
||
variable "enabled" { | ||
type = bool | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
pkg/resources/testdata/TestAcc_ApiIntegration_changeApiProvider/2/test.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,11 @@ | ||
resource "snowflake_api_integration" "test_change" { | ||
name = var.name | ||
api_provider = "azure_api_management" | ||
azure_tenant_id = var.azure_tenant_id | ||
azure_ad_application_id = var.azure_ad_application_id | ||
api_allowed_prefixes = var.api_allowed_prefixes | ||
api_blocked_prefixes = var.api_blocked_prefixes | ||
api_key = var.api_key | ||
comment = var.comment | ||
enabled = var.enabled | ||
} |
31 changes: 31 additions & 0 deletions
31
pkg/resources/testdata/TestAcc_ApiIntegration_changeApiProvider/2/variables.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,31 @@ | ||
variable "name" { | ||
type = string | ||
} | ||
|
||
variable "azure_tenant_id" { | ||
type = string | ||
} | ||
|
||
variable "azure_ad_application_id" { | ||
type = string | ||
} | ||
|
||
variable "api_allowed_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "api_blocked_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "api_key" { | ||
type = string | ||
} | ||
|
||
variable "comment" { | ||
type = string | ||
} | ||
|
||
variable "enabled" { | ||
type = bool | ||
} |
9 changes: 9 additions & 0 deletions
9
pkg/resources/testdata/TestAcc_ApiIntegration_google/1/test.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,9 @@ | ||
resource "snowflake_api_integration" "test_gcp_int" { | ||
name = var.name | ||
api_provider = "google_api_gateway" | ||
google_audience = var.google_audience | ||
api_allowed_prefixes = var.api_allowed_prefixes | ||
api_blocked_prefixes = var.api_blocked_prefixes | ||
comment = var.comment | ||
enabled = var.enabled | ||
} |
24 changes: 24 additions & 0 deletions
24
pkg/resources/testdata/TestAcc_ApiIntegration_google/1/variables.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,24 @@ | ||
variable "name" { | ||
type = string | ||
} | ||
|
||
variable "google_audience" { | ||
type = string | ||
} | ||
|
||
variable "api_allowed_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "api_blocked_prefixes" { | ||
type = list(string) | ||
} | ||
|
||
variable "comment" { | ||
type = string | ||
} | ||
|
||
variable "enabled" { | ||
type = bool | ||
} | ||
|
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.