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

New Resource: `azurerm_custom_hostname_bindings #1087

Merged
merged 1 commit into from
Apr 6, 2018

Conversation

tombuildsstuff
Copy link
Contributor

Allows the configuration of Custom Hostname Bindings (e.g. www.example.com) to point to an Azure App Service.

Within our CI system this'll need two new variables configured (ARM_TEST_APP_SERVICE and ARM_TEST_DOMAIN) for the acceptance tests - since the Custom Hostname used must have a CNAME to the Azure App Service; which I'll add once this is merged.

Tests pass:

$ acctests azurerm TestAccAzureRMAppServiceCustomHostnameBinding
=== RUN   TestAccAzureRMAppServiceCustomHostnameBinding
=== RUN   TestAccAzureRMAppServiceCustomHostnameBinding/basic
=== RUN   TestAccAzureRMAppServiceCustomHostnameBinding/basic/basic
=== RUN   TestAccAzureRMAppServiceCustomHostnameBinding/basic/import
--- PASS: TestAccAzureRMAppServiceCustomHostnameBinding (223.11s)
    --- PASS: TestAccAzureRMAppServiceCustomHostnameBinding/basic (223.10s)
        --- PASS: TestAccAzureRMAppServiceCustomHostnameBinding/basic/basic (124.19s)
        --- PASS: TestAccAzureRMAppServiceCustomHostnameBinding/basic/import (98.92s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm       223.140s

Fixes #1026

Tests pass:

```
$ acctests azurerm TestAccAzureRMAppServiceCustomHostnameBinding
=== RUN   TestAccAzureRMAppServiceCustomHostnameBinding
=== RUN   TestAccAzureRMAppServiceCustomHostnameBinding/basic
=== RUN   TestAccAzureRMAppServiceCustomHostnameBinding/basic/basic
=== RUN   TestAccAzureRMAppServiceCustomHostnameBinding/basic/import
--- PASS: TestAccAzureRMAppServiceCustomHostnameBinding (223.11s)
    --- PASS: TestAccAzureRMAppServiceCustomHostnameBinding/basic (223.10s)
        --- PASS: TestAccAzureRMAppServiceCustomHostnameBinding/basic/basic (124.19s)
        --- PASS: TestAccAzureRMAppServiceCustomHostnameBinding/basic/import (98.92s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm       223.140s
```
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM minus a nit

// Ensure we have enough information in state to look up in API
rs, ok := s.RootModule().Resources[name]
if !ok {
return fmt.Errorf("Not found: %s", name)
Copy link
Member

Choose a reason for hiding this comment

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

%q here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in general we don’t for these since this is the resource name (eg “azurerm_resource_group”) rather than the name property of the resource so generally we just output those raw (since it means the resource is missing from the state) - but I can update this?

@tombuildsstuff tombuildsstuff merged commit a016c3b into master Apr 6, 2018
@tombuildsstuff tombuildsstuff deleted the app-service-custom-hostnames branch April 6, 2018 16:31
tombuildsstuff added a commit that referenced this pull request Apr 6, 2018
@Phydeauxman
Copy link

@tombuildsstuff thanks...was hoping to not have to do this out of band of our automation.

@ghost
Copy link

ghost commented Mar 31, 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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 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.

Feature Request: Support for Web App Custom Hostname Bindings
3 participants