Skip to content

Commit

Permalink
update docs and code
Browse files Browse the repository at this point in the history
Signed-off-by: ziyeqf <[email protected]>
  • Loading branch information
ziyeqf committed Aug 29, 2023
1 parent af25696 commit 0bbc244
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ func TestAccServiceNetworkingALBFrontend_basic(t *testing.T) {
func TestAccServiceNetworkingALBFrontend_complete(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_application_load_balancer_frontend", "test")

// it's available on limited regions.
data.Locations.Primary = "northeurope"
r := FrontendResource{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Expand All @@ -69,8 +67,6 @@ func TestAccServiceNetworkingALBFrontend_complete(t *testing.T) {
func TestAccServiceNetworkingALBFrontend_update(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_application_load_balancer_frontend", "test")

// it's available on limited regions.
data.Locations.Primary = "northeurope"
r := FrontendResource{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Expand All @@ -97,24 +93,24 @@ func (r FrontendResource) basic(data acceptance.TestData) string {
%s
resource "azurerm_application_load_balancer_frontend" "test" {
name = "acct-frnt-%d"
alb_id = azurerm.test.id
location = azurerm_alb.test.location
name = "acct-frnt-%d"
azurerm_application_load_balancer_id = azurerm_application_load_balancer.test.id
location = azurerm_application_load_balancer.test.location
}
`, AlbResource{}.basic(data), data.RandomInteger)
`, ApplicationLoadBalancerResource{}.basic(data), data.RandomInteger)
}

func (r FrontendResource) complete(data acceptance.TestData) string {
return fmt.Sprintf(`
%s
resource "azurerm_application_load_balancer_frontend" "test" {
name = "acct-frnt-%d"
alb_id = azurerm_alb.test.id
location = azurerm_alb.test.location
name = "acct-frnt-%d"
application_load_balancer_id = azurerm_application_load_balancer.test.id
location = azurerm_application_load_balancer.test.location
tags = {
"tag1" = "value1"
}
}
`, AlbResource{}.basic(data), data.RandomInteger)
`, ApplicationLoadBalancerResource{}.basic(data), data.RandomInteger)
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ resource "azurerm_application_load_balancer" "example" {
}
resource "azurerm_application_load_balancer_frontend" "example" {
name = "example"
location = "West Europe"
alb_id = azurerm_alb.example.id
name = "example"
location = "West Europe"
application_load_balancer_id = azurerm_application_load_balancer.example.id
}
```

Expand All @@ -32,9 +32,9 @@ The following arguments are supported:

* `name` - (Required) The name which should be used for this Application Gateway for Containers Frontend. Changing this forces a new resource to be created.

* `location` - (Required) The Azure Region where the Application Gateway for Containers Frontend. should exist. Changing this forces a new resource to be created.
* `location` - (Required) The Azure Region where the Application Gateway for Containers Frontend should exist. Changing this forces a new resource to be created. Available Regions could be found in [here](https://learn.microsoft.com/en-us/azure/application-gateway/for-containers/overview#supported-regions).

* `alb_id` - (Required) The ID of the Application Gateway for Containers. Changing this forces a new Application Gateway for Containers Frontend to be created.
* `application_load_balancer_id` - (Required) The ID of the Application Gateway for Containers. Changing this forces a new resource to be created.

---

Expand Down

0 comments on commit 0bbc244

Please sign in to comment.