Open toni-moreno opened 1 year ago
If you change storage_integration = "azure_integration"
to storage_integration = "AZURE_INTEGRATION"
then that should fix your issue
@danu165 you are right .
But the provider should work with both cases upper and lowercase integration names. IMHO The bug still exist.
These are the 4 possible options: lower/upper with double quotes and without
With double quotes
CREATE STAGE "MYDB"."PUBLIC"."MYSTAKE" URL = 'azure://xxxxx' STORAGE_INTEGRATION = "azure_integration"; --> FAIL
CREATE STAGE "MYDB"."PUBLIC"."MYSTAKE" URL = 'azure://xxxxx' STORAGE_INTEGRATION = "AZURE_INTEGRATION"; OK
Without double quotes
CREATE STAGE "MYDB"."PUBLIC"."MYSTAKE" URL = 'azure://xxxxx' STORAGE_INTEGRATION = azure_integration; OK
CREATE STAGE "MYDB"."PUBLIC"."MYSTAKE" URL = 'azure://xxxxx' STORAGE_INTEGRATION = AZURE_INTEGRATION; OK
The way it works with both upper and lower case names is without double quotes.
Wouldn't that make it impossible for users that have lowercase storage integrations to specify their integrations? IE. if someone created a storage integration using CREATE STORAGE INTEGRATION "azure_integration"
then it needs to be referred as "azure_integration". Not using quotes would fail.
Hi @danu165 this is a rare case but , you are right, this could happens, and removing the double quotes won't fix it. Maybe could be good if anybody could add better information in the provider documentation, remembering and/or recommending use uppercase names for integrations in this resource.
Provider Version
Terraform Version
Terraform v1.4.6 on linux_amd64
Problem description
When trying to create new external stages with
storage_integration
this error happensExpected behavior
Create a new storage integration
Code samples and commands
Additional context
After review some logs setting TF_LOG env var, I've noticed that the provider is building erroneously the query . It creates the following query
but the correct query should built without double quotes in "azure_integration"