Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app_service_environment resource - allow "Web, Publishing" for the internal_load_balancing_mode argument #7346

Merged
merged 5 commits into from Jun 23, 2020
Merged

app_service_environment resource - allow "Web, Publishing" for the internal_load_balancing_mode argument #7346

merged 5 commits into from Jun 23, 2020

Conversation

jbinko
Copy link
Contributor

@jbinko jbinko commented Jun 16, 2020

Currently the resource app_service_environment supports only three modes for InternalLoadBalancingMode argument:

  1. None
  2. Web
  3. Publishing

But ASE supports one more ILB mode. It is combined value: "Web, Publishing"

  1. None = public VIP only
  2. Web = only ports 80/443 are mapped to ILB VIP
  3. Publishing = only FTP ports are mapped to ILB VIP
  4. Web, Publishing = both ports 80/443 and FTP ports are mapped to an ILB VIP.

This fix is accepting additional ILB mode number 3.

resource "azurerm_app_service_environment" "ase" {
name = var.aseName
resource_group_name = var.resourceGroupName
subnet_id = data.azurerm_subnet.aseSubnet.id
pricing_tier = "I2"
front_end_scale_factor = 10
internal_load_balancing_mode = "Web, Publishing"
}

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jbinko
Thanks for this PR, just a a couple of comments below to address.

Additionally, could we have a test that covers this parameter being set too? (something like TestAccAzureRMAppServiceEnvironment_internalLoadBalancer)

Thanks again!

* `internal_load_balancing_mode` - (Optional) Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values are `None`, `Web` and `Publishing`. Defaults to `None`.
* `internal_load_balancing_mode` - (Optional) Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values are `None`, `Web`, `Publishing` and combined value `"Web, Publishing"`. Defaults to `None`.

~> **NOTE** You should prefer to select value either `None` or combined value `"Web, Publishing"` as the other values might become deprecated in the future.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this documented / published somewhere? If not official, it's probably as well to leave this out for the time being.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is info from Microsoft ASE Program Manager - Christina - (my internal communication). No any official statement I'm aware of. Let me know what you prefer I'll change it accordingly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - I think until the official information on this is published somewhere, we should avoid preempting it, plans and IT projects do have a way of changing unexpectedly!

@jbinko
Copy link
Contributor Author

jbinko commented Jun 22, 2020

Hi @jbinko
Thanks for this PR, just a a couple of comments below to address.

Additionally, could we have a test that covers this parameter being set too? (something like TestAccAzureRMAppServiceEnvironment_internalLoadBalancer)

Thanks again!

OK I prepared some unit test. Please review. This is the result of unit test run:
make acctests SERVICE='web' TESTARGS='-run=TestAccAzureRMAppServiceEnvironment_internalLoadBalancer' TESTTIMEOUT='180m' ... TF_ACC=1 go test -v ./azurerm/internal/services/web/tests/ -run=TestAccAzureRMAppServiceEnvironment_internalLoadBalancer -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc" === RUN TestAccAzureRMAppServiceEnvironment_internalLoadBalancer === PAUSE TestAccAzureRMAppServiceEnvironment_internalLoadBalancer === CONT TestAccAzureRMAppServiceEnvironment_internalLoadBalancer --- PASS: TestAccAzureRMAppServiceEnvironment_internalLoadBalancer (5108.55s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/web/tests 5108.694s

@ghost ghost added size/S and removed size/XS labels Jun 22, 2020
Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jbinko
Just a couple of minor changes required. I'll get the tests run against this on CI so we're ready to merge when you've updated.

Thanks again!

* `internal_load_balancing_mode` - (Optional) Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values are `None`, `Web` and `Publishing`. Defaults to `None`.
* `internal_load_balancing_mode` - (Optional) Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values are `None`, `Web`, `Publishing` and combined value `"Web, Publishing"`. Defaults to `None`.

~> **NOTE** You should prefer to select value either `None` or combined value `"Web, Publishing"` as the other values might become deprecated in the future.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - I think until the official information on this is published somewhere, we should avoid preempting it, plans and IT projects do have a way of changing unexpectedly!

@jackofallops
Copy link
Member

Tests passing:
image

@jackofallops jackofallops merged commit e47be41 into hashicorp:master Jun 23, 2020
jackofallops added a commit that referenced this pull request Jun 23, 2020
@katbyte katbyte added this to the v2.16.0 milestone Jun 23, 2020
katbyte added a commit that referenced this pull request Jun 23, 2020
@ghost
Copy link

ghost commented Jun 25, 2020

This has been released in version 2.16.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.16.0"
}
# ... other configuration ...

jrauschenbusch pushed a commit to jrauschenbusch/terraform-provider-azurerm that referenced this pull request Jun 29, 2020
jrauschenbusch pushed a commit to jrauschenbusch/terraform-provider-azurerm that referenced this pull request Jun 29, 2020
jrauschenbusch pushed a commit to jrauschenbusch/terraform-provider-azurerm that referenced this pull request Jun 29, 2020
jrauschenbusch pushed a commit to jrauschenbusch/terraform-provider-azurerm that referenced this pull request Jun 29, 2020
@ghost
Copy link

ghost commented Jul 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Jul 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for creating internal Application Service Environments
3 participants