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_dedicated_hardware_security_module #7727

Merged
merged 5 commits into from
Jul 30, 2020

Conversation

neil-yechenwei
Copy link
Contributor

@neil-yechenwei neil-yechenwei commented Jul 14, 2020

Service owner suggests to not use West/North Europe or US East/US East2 for testing because these locations have high customer usage. So I am testing on "canadacentral" location.

(fixes #7602 )

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 @neil-yechenwei - overall this looks good, but hardwaresecuritymodule is a bit long, and hsm is a well recognized term. So I think we should use it where possible. But the full term is good for the resource name.

@@ -30,6 +30,7 @@ var services = mapOf(
"eventgrid" to "EventGrid",
"eventhub" to "EventHub",
"frontdoor" to "FrontDoor",
"hardwaresecuritymodule" to "Hardware Security Module",
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a bit long, could we maybe abbreviate it to

Suggested change
"hardwaresecuritymodule" to "Hardware Security Module",
"hsm" to "Hardware Security Module",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -35,6 +35,7 @@ import (
eventgrid "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/eventgrid/client"
eventhub "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/eventhub/client"
frontdoor "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/frontdoor/client"
hardwaresecuritymodules "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hardwaresecuritymodule/client"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
hardwaresecuritymodules "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hardwaresecuritymodule/client"
hsm "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hardwaresecuritymodule/client"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

EventGrid *eventgrid.Client
Eventhub *eventhub.Client
Frontdoor *frontdoor.Client
HardwareSecurityModules *hardwaresecuritymodules.Client
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
HardwareSecurityModules *hardwaresecuritymodules.Client
HSM *hardwaresecuritymodules.Client

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -202,6 +204,7 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
client.EventGrid = eventgrid.NewClient(o)
client.Eventhub = eventhub.NewClient(o)
client.Frontdoor = frontdoor.NewClient(o)
client.HardwareSecurityModules = hardwaresecuritymodules.NewClient(o)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
client.HardwareSecurityModules = hardwaresecuritymodules.NewClient(o)
client.HSM = hsm.NewClient(o)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -31,6 +31,7 @@ import (
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/eventgrid"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/eventhub"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/frontdoor"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hardwaresecuritymodule"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hardwaresecuritymodule"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hsm"

and so on

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

}

resource "azurerm_resource_group" "test" {
name = "acctest-hsmrg-%d"
Copy link
Collaborator

Choose a reason for hiding this comment

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

all rg should start with acctestRG

Suggested change
name = "acctest-hsmrg-%d"
name = "acctestRG-hsm-%d"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated


* `network_profile` - (Required) A `network_profile` block as defined below.

* `stamp_id` - (Required) The ID of the stamp. Changing this forces a new Dedicated Hardware Security Module to be created.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we order these alphabetically o asin schema?

as well as list the possible values for stand id given there are only two allowed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@katbyte katbyte added this to the v2.20.0 milestone Jul 14, 2020
@neil-yechenwei
Copy link
Contributor Author

@katbyte , thanks for your comments. I've updated code.

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 @neil-yechenwei! LGTM

@katbyte katbyte merged commit 3ca619d into hashicorp:master Jul 30, 2020
katbyte added a commit that referenced this pull request Jul 30, 2020
@ghost
Copy link

ghost commented Aug 30, 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!

@ghost ghost locked and limited conversation to collaborators Aug 30, 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 azurerm_dedicated_hardware_security_module
4 participants