From ddd00c5b7e1862e2328dbdf599d157a443dce134 Mon Sep 17 00:00:00 2001 From: ChrisIsidora <7924584+ChrisIsidora@users.noreply.github.com> Date: Wed, 7 Dec 2022 20:23:22 +0100 Subject: [PATCH] fix: Removed Read for API_KEY (#1402) * fix: Removed Read for API_KEY * Updated Docs --- docs/resources/api_integration.md | 2 +- pkg/resources/api_integration.go | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/resources/api_integration.md b/docs/resources/api_integration.md index 4bf7014bb6..e7278dc332 100644 --- a/docs/resources/api_integration.md +++ b/docs/resources/api_integration.md @@ -35,7 +35,7 @@ resource "snowflake_api_integration" "api_integration" { - `api_aws_role_arn` (String) ARN of a cloud platform role. - `api_blocked_prefixes` (List of String) Lists the endpoints and resources in the HTTPS proxy service that are not allowed to be called from Snowflake. -- `api_key` (String) The API key (also called a “subscription key”). +- `api_key` (String, Sensitive) The API key (also called a “subscription key”). - `azure_ad_application_id` (String) The 'Application (client) id' of the Azure AD app for your remote service. - `azure_tenant_id` (String) Specifies the ID for your Office 365 tenant that all Azure API Management instances belong to. - `enabled` (Boolean) Specifies whether this API integration is enabled or disabled. If the API integration is disabled, any external function that relies on it will not work. diff --git a/pkg/resources/api_integration.go b/pkg/resources/api_integration.go index 6a284a9364..b82ed5787a 100644 --- a/pkg/resources/api_integration.go +++ b/pkg/resources/api_integration.go @@ -80,6 +80,7 @@ var apiIntegrationSchema = map[string]*schema.Schema{ "api_key": { Type: schema.TypeString, Optional: true, + Sensitive: true, Description: "The API key (also called a “subscription key”).", }, "enabled": { @@ -210,10 +211,6 @@ func ReadAPIIntegration(d *schema.ResourceData, meta interface{}) error { return err } } - case "API_KEY": - if err = d.Set("api_key", v.(string)); err != nil { - return err - } case "API_AWS_IAM_USER_ARN": if err := d.Set("api_aws_iam_user_arn", v.(string)); err != nil { return err