Skip to content

Commit

Permalink
Added missing public_ip_addresses property to api_management (#2310)
Browse files Browse the repository at this point in the history
* Added missing public_ip_addresses property to api_management

* Exteded tests to look for the computed public_ip_addresses property

* Corrected spelling mistakes and improved testing of IP list content
  • Loading branch information
vidarw authored and tombuildsstuff committed Nov 14, 2018
1 parent 5dd8a37 commit c96c5e2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions azurerm/data_source_api_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions azurerm/data_source_api_management_test.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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.#"),
),
},
},
Expand Down
8 changes: 8 additions & 0 deletions azurerm/resource_arm_api_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions azurerm/resource_arm_api_management_test.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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.#"),
),
},
{
Expand Down
2 changes: 2 additions & 0 deletions website/docs/d/api_management.html.markdown
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/api_management.html.markdown
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c96c5e2

Please sign in to comment.