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

azurerm_app_service_certificate - support for hosting_environment_profile_id #7087

Merged
merged 8 commits into from Jun 16, 2020

Conversation

wmdave
Copy link
Contributor

@wmdave wmdave commented May 26, 2020

No description provided.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks for the enhancement PR @wmdave - overall this looks good but could we update the docs with the new property and add this to a test? thanks!

@katbyte katbyte added this to the v2.12.0 milestone May 26, 2020
@ghost ghost added the documentation label May 26, 2020
@katbyte katbyte modified the milestones: v2.12.0, v2.13.0 May 28, 2020
@tombuildsstuff tombuildsstuff modified the milestones: v2.13.0, v2.14.0 Jun 4, 2020
@ghost ghost added size/M and removed size/XS labels Jun 8, 2020
@dhdanie
Copy link
Contributor

dhdanie commented Jun 8, 2020

I added a test for certificate creation in the ASE test cases (figured that was better than adding an ASE to certificate test cases). There's now a test failure on CI. Locally, I was relying on ARM_SUBSCRIPTION_ID to be set to help calculate the appropriate hosting_environment_profile for the certificate but apparently it's not for CI. I think I may just re-factor the change to require something like this:

hosting_environment {
  resource_group_name = "<ASE RG Name>"
  environment_name = "<ASE Name>"
}

I'm relatively sure that the ASE in question would have to be in the same subscription, so doing this makes the configuration a little cleaner. Only thing I don't like is that the original design leveraged hosting_environment_profile_id which is the name that's used in the Azure RM, so it made it a little easier infer how the configuration was being applied in Azure.

@ghost ghost removed the waiting-response label Jun 8, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thats the place for the test! however i'm not entirely sure why you moved away from the single hosting_environment_id property - the RG and ASE name would be a part of is as would the subscription ID?

@wmdave
Copy link
Contributor Author

wmdave commented Jun 10, 2020

The hosting_environment_id was of the format /subscriptions/<subid>/resourceGroups/<rg>/... and the subscription seemed superfluous (plus I didn't see an easy way to determine subid inside the test cases, though I may just not have looked in the right place). I liked the single property to begin with was because the name matched an actual property in the Azure resource manager, so you could literally copy and paste the value from Azure to your tf file. Once I decided to get rid of subscription, it didn't seem as intuitive (no longer copy/paste) as a single property since you for sure need both ASE RG (likely different than cert RG) and ASE name.

Open to changing back to a single property, if you think that's best.

@tombuildsstuff tombuildsstuff modified the milestones: v2.14.0, v2.15.0 Jun 11, 2020
@katbyte
Copy link
Collaborator

katbyte commented Jun 11, 2020

@wmdave - I do, you'd then be able to just us azurerm_app_service_environment.test.id, parse it's id with an ASE parse id function and have everything you need

@dhdanie
Copy link
Contributor

dhdanie commented Jun 12, 2020

Okay, switched back and I think updated docs and test case. Passed locally.

@katbyte katbyte changed the title Added hosting environment profile capability azurerm_app_service_certificate - support for hosting_environment_profile_id Jun 16, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

thanks @wmdave! LGTM now

@katbyte katbyte merged commit 339934e into hashicorp:master Jun 16, 2020
katbyte added a commit that referenced this pull request Jun 16, 2020
@ghost
Copy link

ghost commented Jun 19, 2020

This has been released in version 2.15.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.15.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jul 17, 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 17, 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.

None yet

4 participants