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

[WIP] provider/azurerm: create app_gateway resource #14426

Closed
wants to merge 20 commits into from
Closed

[WIP] provider/azurerm: create app_gateway resource #14426

wants to merge 20 commits into from

Conversation

brandontosch
Copy link
Contributor

@brandontosch brandontosch commented May 12, 2017

Continuing the work of @pmcatominey for #8670
Refactored to build with latest master
Still need to

  • docs
  • ensure enough test coverage
  • support for linking virtual machine scale set or network interface

@dominik-lekse
Copy link
Contributor

@brandontosch Many thanks for sharing this pull request. I can offer to test it next week. Do you need support with anything open (e.g. tests or documentation)?

As a remark, in my opinion it would be the better approach to take over from another existing pull request to "import the work" from #10413 by @pmcatominey by merging the branch of #10413 into your branch. This would keep the original commits by @pmcatominey since those do include a significant amount of code.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

👋 hey @brandontosch

Thanks for this PR :)

I've taken a look and left some comments inline, however this is off to a good start. Most of the comments fall into one of the following categories:

  • Allowing different casing on variables in the Schema, by setting true on the validation.StringInSlice method
  • Ensuring different casings are handled on the way back from Azure using a DiffSuppressFunc in the Schema
  • Passing in ID's instead of Name's for Azure Resources, rather than building the ID's ourselves, since the ID's (unfortunately) aren't guaranteed to be stable in the future.

I'm hoping that makes sense? Please let me know when you want me to take another look :)

Thanks!

"name": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be great if we can ignore the casing on this, using an DiffSuppressFunc, e.g.:

DiffSuppressFunc: ignoreCaseDiffSuppressFunc

"tier": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above, could we add a DiffSuppressFunc here?

Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{
string(network.TLSv10),
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above, could we add a DiffSuppressFunc here?

Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
string(network.Detection),
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above, could we add a DiffSuppressFunc here?

ValidateFunc: validation.StringInSlice([]string{
string(network.Standard),
string(network.WAF),
}, false),
Copy link
Contributor

Choose a reason for hiding this comment

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

can we set this to true to allow different casings here?

fqdn_list = [
"terraform.io",
]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove the comments for the Computed fields within this test case?

default_backend_http_settings_name = "backend-http-1"

path_rule {
# id = computed
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove the comments for the Computed fields here?

}

backend_http_settings {
# id = computed
Copy link
Contributor

Choose a reason for hiding this comment

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

(same as above, can we remove the comments for the computed fields here)


authentication_certificate {
name = "auth-1"
data = "${file("resource_arm_app_gateway_test.cer")}"
Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to inline this value?

ssl_certificate {
# id = computed
name = "ssl-1"
data = "${file("resource_arm_app_gateway_test.pfx")}"
Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to inline this value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought I could get it to work, but trying to inline the pfx file contents is giving me fits. Any ideas? Was able to do the cer file no problem since the contents are just simple characters.

@stack72
Copy link
Contributor

stack72 commented Jun 5, 2017

ping @brandontosch

@brandontosch
Copy link
Contributor Author

Sorry for dropping off, been a little chaotic lately. Will try and jump back in on this soon.

@isaacsgi
Copy link

isaacsgi commented Jun 7, 2017

hey Brandon - this is awesome ... working to configure my own env set up and wondering if there's some way I'd be able to help you?

@isaacsgi
Copy link

Hi @brandontosch ... I've got an environment configured with your branch and am trying this out. Just touching base to check in on whether you are actively working on the feedback above as well?

@brandontosch
Copy link
Contributor Author

Hi @isaacsgi, I've addressed some of the requested changes (anything I gave a thumbs up to should be done), but I'd love any help you can offer. Been hard to find time lately..

@isaacsgi
Copy link

Hi - moved this over to the new Provider code structure for Terraform 0.10 - see here:
hashicorp/terraform-provider-azurerm#120

@tombuildsstuff
Copy link
Contributor

Closing this PR as it's been migrated to the new repo: hashicorp/terraform-provider-azurerm#120

@ghost
Copy link

ghost commented Apr 8, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

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

6 participants