-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated azurerm_nginx_deployment to support latest API changes (scali…
…ng & user_profile) Users may now scale their NGINXaaS deployments and provide preferred contact information.
- Loading branch information
Showing
3 changed files
with
132 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,8 @@ func TestAccNginxDeployment_basic(t *testing.T) { | |
Config: r.basic(data), | ||
Check: acceptance.ComposeTestCheckFunc( | ||
check.That(data.ResourceName).ExistsInAzure(r), | ||
check.That(data.ResourceName).Key("scaling").HasValue("10"), | ||
check.That(data.ResourceName).Key("user_profile").Exists(), | ||
), | ||
}, | ||
data.ImportStep(), | ||
|
@@ -84,6 +86,8 @@ func (a DeploymentResource) basic(data acceptance.TestData) string { | |
return fmt.Sprintf(` | ||
%s | ||
resource "azurerm_nginx_deployment" "test" { | ||
|
@@ -100,6 +104,15 @@ resource "azurerm_nginx_deployment" "test" { | |
network_interface { | ||
subnet_id = azurerm_subnet.test.id | ||
} | ||
scaling { | ||
capacity = 10 | ||
} | ||
user_profile { | ||
preferred_email = "[email protected]" | ||
} | ||
tags = { | ||
foo = "bar" | ||
} | ||
|
@@ -111,6 +124,8 @@ func (a DeploymentResource) update(data acceptance.TestData) string { | |
return fmt.Sprintf(` | ||
%s | ||
resource "azurerm_nginx_deployment" "test" { | ||
|
@@ -128,6 +143,14 @@ resource "azurerm_nginx_deployment" "test" { | |
subnet_id = azurerm_subnet.test.id | ||
} | ||
scaling { | ||
capacity = 20 | ||
} | ||
user_profile { | ||
preferred_email = "[email protected]" | ||
} | ||
tags = { | ||
foo = "bar2" | ||
} | ||
|
@@ -139,6 +162,8 @@ func (a DeploymentResource) identityUser(data acceptance.TestData) string { | |
return fmt.Sprintf(` | ||
%s | ||
resource "azurerm_user_assigned_identity" "test" { | ||
|
@@ -165,6 +190,10 @@ resource "azurerm_nginx_deployment" "test" { | |
network_interface { | ||
subnet_id = azurerm_subnet.test.id | ||
} | ||
scaling { | ||
capacity = 10 | ||
} | ||
} | ||
`, a.template(data), data.RandomInteger) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,14 @@ resource "azurerm_nginx_deployment" "example" { | |
network_interface { | ||
subnet_id = azurerm_subnet.example.id | ||
} | ||
scaling { | ||
capacity = 20 | ||
} | ||
user_profile { | ||
preferred_email = "[email protected]" | ||
} | ||
} | ||
``` | ||
|
||
|
@@ -99,8 +107,12 @@ The following arguments are supported: | |
|
||
* `network_interface` - (Optional) One or more `network_interface` blocks as defined below. Changing this forces a new Nginx Deployment to be created. | ||
|
||
* `scaling` - (Optional) One or more `scaling` blocks as defined below. | ||
|
||
* `tags` - (Optional) A mapping of tags which should be assigned to the Nginx Deployment. | ||
|
||
* `user_profile` - (Optional) One or more `user_profile` blocks as defined below. | ||
|
||
--- | ||
|
||
A `identity` block supports the following: | ||
|
@@ -139,6 +151,20 @@ A `network_interface` block supports the following: | |
|
||
* `subnet_id` - (Required) Specify The SubNet Resource ID to this Nginx Deployment. | ||
|
||
--- | ||
|
||
A `scaling` block supports the following: | ||
|
||
* `capacity` - (Required) Specify the number of NGINX capacity units for this NGINX deployment. | ||
|
||
-> **Note** For more information on NGINX capacity units, please refer to the [NGINX scaling guidance documentation](https://docs.nginx.com/nginxaas/azure/quickstart/scaling/) | ||
|
||
--- | ||
|
||
A `user_profile` block supports the following: | ||
|
||
* `preferred_email` - (Required) Specify the preferred support contact email address of the user used for sending alerts and notification. | ||
|
||
## Attributes Reference | ||
|
||
In addition to the Arguments listed above - the following Attributes are exported: | ||
|