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 for azurerm_synapse_role_assignment #8863

Merged
merged 4 commits into from
Oct 27, 2020

Conversation

njuCZ
Copy link
Contributor

@njuCZ njuCZ commented Oct 13, 2020

synapse data plane resource

image

points that needs to pay attention:
currently the id format is {synapseWorkspaceId}|{synapseRoleAssignmentId}, please confirm it's ok.
or this id format {synapseWorkspaceId}/roleAssignments/{synapseRoleAssignmentId} is better

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 @njuCZ - i've given this a review and left some comments inline

Comment on lines 45 to 55
// apply firewall rule first
{
Config: testAccAzureRMSynapseRoleAssignment_template(data),
},
// create synapse role assignment
{
Config: testAccAzureRMSynapseRoleAssignment_basic(data),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSynapseRoleAssignmentExists(data.ResourceName),
),
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

how come this is a two step process? this means users won't be able to chain these togeather?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

user must have network access permission first and then they could assign synapse role. users could use depends_on to chain these togeather

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 use depends on in the tf configs instead of 2 tests steps?

@njuCZ
Copy link
Contributor Author

njuCZ commented Oct 21, 2020

@katbyte Thanks for your time to review this PR, could you please have a look again?

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 @njuCZ, just a few more comments to address and this should be good to merge

Comment on lines 45 to 55
// apply firewall rule first
{
Config: testAccAzureRMSynapseRoleAssignment_template(data),
},
// create synapse role assignment
{
Config: testAccAzureRMSynapseRoleAssignment_basic(data),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSynapseRoleAssignmentExists(data.ResourceName),
),
},
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 use depends on in the tf configs instead of 2 tests steps?

@njuCZ njuCZ closed this Oct 27, 2020
@njuCZ njuCZ reopened this Oct 27, 2020
@njuCZ
Copy link
Contributor Author

njuCZ commented Oct 27, 2020

Hi @katbyte, I have updated this PR, could you have a look again when free?

@njuCZ njuCZ requested a review from katbyte October 27, 2020 04:43
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 @njuCZ - LGTM 👍

@katbyte katbyte added this to the v2.34.0 milestone Oct 27, 2020
@katbyte katbyte merged commit 926358f into hashicorp:master Oct 27, 2020
katbyte added a commit that referenced this pull request Oct 27, 2020
@ghost
Copy link

ghost commented Oct 29, 2020

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

@vsabella
Copy link

@katbyte @njuCZ

This regresses the provider for any Azure environment which does not have Synapse available - which is basically China, USGov, and German clouds. The provider is no longer usable in those environments because the call to create a synapse token fails. See #9099

https://github.com/Azure/go-autorest/blob/master/autorest/azure/environments.go

You shouldn't add Synapse credentials into the main provider here: https://github.com/terraform-providers/terraform-provider-azurerm/blob/2c7ae3cfcc59aad45239d021aa64198dd1701d51/azurerm/internal/clients/builder.go#L100

I imagine you would want to use the Client model using Autorest to create a new client - similar to how DataLake provisions their client.

Do we not run automated tests against environments than public cloud (like say German cloud) to prevent regression?

@ghost
Copy link

ghost commented Nov 27, 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 as resolved and limited conversation to collaborators Nov 27, 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.

4 participants