diff --git a/azurerm/data_source_api_management.go b/azurerm/data_source_api_management.go index 20a477e01ca1..00cdb570cf9d 100644 --- a/azurerm/data_source_api_management.go +++ b/azurerm/data_source_api_management.go @@ -25,6 +25,14 @@ func dataSourceApiManagementService() *schema.Resource { "location": locationForDataSourceSchema(), + "public_ip_addresses": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "publisher_name": { Type: schema.TypeString, Computed: true, diff --git a/azurerm/data_source_api_management_test.go b/azurerm/data_source_api_management_test.go old mode 100644 new mode 100755 index 6be78279d88c..df6be5be7896 --- a/azurerm/data_source_api_management_test.go +++ b/azurerm/data_source_api_management_test.go @@ -26,6 +26,7 @@ func TestAccDataSourceAzureRMApiManagement_basic(t *testing.T) { resource.TestCheckResourceAttr(dataSourceName, "sku.0.capacity", "1"), resource.TestCheckResourceAttr(dataSourceName, "sku.0.name", "Developer"), resource.TestCheckResourceAttr(dataSourceName, "tags.%", "0"), + resource.TestCheckResourceAttrSet(dataSourceName, "public_ip_addresses.#"), ), }, }, diff --git a/azurerm/resource_arm_api_management.go b/azurerm/resource_arm_api_management.go index b192960b54f5..10027ffcd50e 100644 --- a/azurerm/resource_arm_api_management.go +++ b/azurerm/resource_arm_api_management.go @@ -44,6 +44,14 @@ func resourceArmApiManagementService() *schema.Resource { "location": locationSchema(), + "public_ip_addresses": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "publisher_name": { Type: schema.TypeString, Required: true, diff --git a/azurerm/resource_arm_api_management_test.go b/azurerm/resource_arm_api_management_test.go old mode 100644 new mode 100755 index 893e96de7b56..1b311b82a085 --- a/azurerm/resource_arm_api_management_test.go +++ b/azurerm/resource_arm_api_management_test.go @@ -75,6 +75,7 @@ func TestAccAzureRMApiManagement_complete(t *testing.T) { Check: resource.ComposeTestCheckFunc( testCheckAzureRMApiManagementExists(resourceName), resource.TestCheckResourceAttr(resourceName, "tags.Acceptance", "Test"), + resource.TestCheckResourceAttrSet(resourceName, "public_ip_addresses.#"), ), }, { @@ -82,7 +83,7 @@ func TestAccAzureRMApiManagement_complete(t *testing.T) { ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{ - "certificate", // not returned from API, sensitive + "certificate", // not returned from API, sensitive "hostname_configuration.0.portal.0.certificate", // not returned from API, sensitive "hostname_configuration.0.portal.0.certificate_password", // not returned from API, sensitive "hostname_configuration.0.proxy.0.certificate", // not returned from API, sensitive diff --git a/website/docs/d/api_management.html.markdown b/website/docs/d/api_management.html.markdown old mode 100644 new mode 100755 index 9b4fcf9a4caf..118bdcccaacd --- a/website/docs/d/api_management.html.markdown +++ b/website/docs/d/api_management.html.markdown @@ -49,6 +49,8 @@ output "api_management_id" { * `portal_url` - The URL of the Publisher Portal. +* `public_ip_addresses` - The Public IP addresses of the API Management Service. + * `publisher_name` - The name of the Publisher/Company of the API Management Service. * `publisher_email` - The email of Publisher/Company of the API Management Service. diff --git a/website/docs/r/api_management.html.markdown b/website/docs/r/api_management.html.markdown old mode 100644 new mode 100755 index f4b08725850f..be6f2b5cd59f --- a/website/docs/r/api_management.html.markdown +++ b/website/docs/r/api_management.html.markdown @@ -192,6 +192,8 @@ In addition to all arguments above, the following attributes are exported: * `portal_url` - The URL for the Publisher Portal associated with this API Management service. +* `public_ip_addresses` - The Public IP addresses of the API Management Service. + * `scm_url` - The URL for the SCM (Source Code Management) Endpoint associated with this API Management service. * `identity` - An `identity` block as defined below.