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_role_assignment: Allow for sub aliases scopes #20895

Merged
merged 6 commits into from
Mar 21, 2023

Conversation

favoretti
Copy link
Collaborator

No description provided.

@favoretti
Copy link
Collaborator Author

1 failing is transient and isn't related to the chages.

image

Copy link
Member

@manicminer manicminer left a comment

Choose a reason for hiding this comment

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

Hi @favoretti, thanks for looking at this. I think overall this looks good, I'm just concerned about unit test coverage (see comment below).

@favoretti
Copy link
Collaborator Author

Hi @favoretti, thanks for looking at this. I think overall this looks good, I'm just concerned about unit test coverage (see comment below).

@manicminer Good catch on testing SubscriptionAlias value, thanks for that. Not sure I follow though about IsSubscriptionAliasLevel not being tested below?

@manicminer
Copy link
Member

@favoretti Towards the end of the TestRoleAssignmentID() func, there are checks to ensure the returned ID is populated correctly - we'll want to add checks for the IsSubscriptionAliasLevel and SubscriptionAlias` fields, else the test will just pass whatever their value :)

@favoretti
Copy link
Collaborator Author

@manicminer gotcha, pushed a fix.

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.

LGTM 💡

@katbyte katbyte merged commit 98b87c7 into hashicorp:main Mar 21, 2023
katbyte added a commit that referenced this pull request Mar 21, 2023
@github-actions github-actions bot added this to the v3.49.0 milestone Mar 21, 2023
@github-actions
Copy link

This functionality has been released in v3.49.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@PreciousEdmund
Copy link

Hi, I have a customer that has issues with this version though
When using this version he gets this error "Error: reading Subscription Alias “Hidden ID”: subscriptions.SubscriptionsClient#AliasGet: Failure responding to request: StatusCode=401 – Original Error: autorest/azure: Service returned an error. Status=401 Code=”UserNotAuthorized” Message=”User does not have access Microsoft.Subscription/aliases/write over scope providers/Microsoft.Subscription/aliases/HiddenID"

But when using the version 3.49.0 everything works out fine.

Hidden ID: To Prevent personal information

@sampathkovuri
Copy link

sampathkovuri commented Apr 26, 2023

It seems that I am experiencing a similar error as mentioned above, but only with manually created subscriptions. I have several subscriptions that were created programmatically with Terraform, where I am able to upgrade the azurerm provider without any issues. It looks like the alias is not reading or accepting by the terraform which was created outside the terraform.
If anyone has a solution for this problem, please inform me.

@favoretti
Copy link
Collaborator Author

So initial release code in 3.49 worked? Any ideas which release broke it?

@sampathkovuri
Copy link

So initial release code in 3.49 worked? Any ideas which release broke it?

It works without any issues with 3.49.0, breaks with all versions above it

@PreciousEdmund
Copy link

Oh, glad i'm not the only @sampathkovuri

Please @favoretti , can you look into this

image

@kivio
Copy link

kivio commented Feb 20, 2024

It still doesn't work. Same issues as above with version: "3.82.0"

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2024
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

6 participants