@@ -134,6 +134,37 @@ resource "azurerm_api_connection" "test" {
134134 ignore_changes = ["parameter_values"] # not returned from the API
135135 }
136136}
137+
138+ resource "azurerm_api_connection" "test_sftpwithssh" {
139+ name = "acctestconn-%[2]d-sftpwithssh"
140+ resource_group_name = azurerm_resource_group.test.name
141+ managed_api_id = data.azurerm_managed_api.test_sftpwithssh.id
142+ display_name = "test"
143+
144+ parameter_values = {
145+ "hostName" = "foo.bar.com",
146+ "userName" = "username",
147+ "password" = "password",
148+ "sshPrivateKey" = "",
149+ "sshPrivateKeyPassphrase" = "",
150+ "portNumber" = "22",
151+ "acceptAnySshHostKey" = "true",
152+ "sshHostKeyFingerprint" = "",
153+ "rootFolder" = "/root",
154+ }
155+
156+ tags = {
157+ Hello = "World"
158+ }
159+
160+ lifecycle {
161+ ignore_changes = [
162+ parameter_values["password"],
163+ parameter_values["sshPrivateKey"],
164+ parameter_values["sshPrivateKeyPassphrase"]
165+ ]
166+ }
167+ }
137168` , t .template (data ), data .RandomInteger )
138169}
139170
@@ -161,6 +192,37 @@ resource "azurerm_api_connection" "test" {
161192 ignore_changes = ["parameter_values"] # not returned from the API
162193 }
163194}
195+
196+ resource "azurerm_api_connection" "test_sftpwithssh" {
197+ name = "acctestconn-%[2]d-sftpwithssh"
198+ resource_group_name = azurerm_resource_group.test.name
199+ managed_api_id = data.azurerm_managed_api.test_sftpwithssh.id
200+ display_name = "test"
201+
202+ parameter_values = {
203+ "hostName" = "foo.bar.com",
204+ "userName" = "aBetterUsername",
205+ "password" = "password",
206+ "sshPrivateKey" = "",
207+ "sshPrivateKeyPassphrase" = "",
208+ "portNumber" = "23",
209+ "acceptAnySshHostKey" = "true",
210+ "sshHostKeyFingerprint" = "",
211+ "rootFolder" = "/root",
212+ }
213+
214+ tags = {
215+ Hello = "World"
216+ }
217+
218+ lifecycle {
219+ ignore_changes = [
220+ parameter_values["password"],
221+ parameter_values["sshPrivateKey"],
222+ parameter_values["sshPrivateKeyPassphrase"]
223+ ]
224+ }
225+ }
164226` , template , data .RandomInteger )
165227}
166228
@@ -192,5 +254,10 @@ data "azurerm_managed_api" "test" {
192254 name = "servicebus"
193255 location = azurerm_resource_group.test.location
194256}
257+
258+ data "azurerm_managed_api" "test_sftpwithssh" {
259+ name = "sftpwithssh"
260+ location = azurerm_resource_group.test.location
261+ }
195262` , data .RandomInteger , data .Locations .Primary )
196263}
0 commit comments