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_subscription - Replace Track1 with Pandora SDK #18813

Merged
merged 8 commits into from
Mar 30, 2023

Conversation

aristosvo
Copy link
Collaborator

@aristosvo aristosvo commented Oct 17, 2022

Running Acceptance Tests is kind of impossible for me at the moment as I don't have an EA account which I can play with a bit more.

  • I'll add some tests to make sure it can be validated what I did.

go.mod Outdated Show resolved Hide resolved
@aristosvo aristosvo force-pushed the subscription/pandora-sdk branch from 3405059 to 5fa2c3d Compare October 24, 2022 10:28
@aristosvo aristosvo marked this pull request as ready for review November 1, 2022 11:44
Copy link
Contributor

@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 @aristosvo, this looks great and the tests are passing. I have reservations about adding the management_group_id property here though, more details inline. If you can take a look then this should be good to merge. Thanks!

internal/services/subscription/subscription_resource.go Outdated Show resolved Hide resolved
@aristosvo
Copy link
Collaborator Author

Rebased and management group removed

@jackofallops
Copy link
Member

Hi @aristosvo - Hope you don't mind, I'm digging into an API permissions issue on this resource and I've pushed a few changes. I may need to do more depending on the outcome of the investigation. For context, permissions that allow a user to create subscriptions in the Portal are insufficient via the API. (at least for MCAs) As soon as that's resolved, and we can test this works as expected, we can get it merged.

@jackofallops
Copy link
Member

Tested manually:

Plan: 1 to add, 0 to change, 0 to destroy.
azurerm_subscription.test: Creating...
azurerm_subscription.test: Still creating... [10s elapsed]
azurerm_subscription.test: Still creating... [20s elapsed]
azurerm_subscription.test: Still creating... [30s elapsed]
azurerm_subscription.test: Still creating... [40s elapsed]
azurerm_subscription.test: Still creating... [50s elapsed]
azurerm_subscription.test: Still creating... [1m0s elapsed]
azurerm_subscription.test: Still creating... [1m10s elapsed]
azurerm_subscription.test: Still creating... [1m20s elapsed]
azurerm_subscription.test: Still creating... [1m30s elapsed]
azurerm_subscription.test: Creation complete after 1m38s [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

image

Plan: 0 to add, 0 to change, 1 to destroy.
azurerm_subscription.test: Destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 1m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 1m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 1m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 1m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 1m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 1m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 2m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 2m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 2m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 2m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 2m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 2m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 3m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 3m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 3m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 3m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 3m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 3m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 4m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 4m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 4m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 4m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 4m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 4m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 5m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 5m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 5m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 5m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 5m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 5m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 6m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 6m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 6m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 6m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 6m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 6m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 7m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 7m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 7m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 7m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 7m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 7m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 8m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 8m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 8m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 8m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 8m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 8m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 9m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 9m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 9m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 9m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 9m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 9m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 10m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 10m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 10m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 10m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 10m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 10m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 11m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 11m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 11m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 11m30s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 11m40s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 11m50s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 12m0s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 12m10s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 12m20s elapsed]
azurerm_subscription.test: Still destroying... [id=/providers/Microsoft.Subscription/aliases/testAcc-SteDev20230329-3, 12m30s elapsed]
azurerm_subscription.test: Destruction complete after 12m31s

Destroy complete! Resources: 1 destroyed.

image

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 🪗

@jackofallops jackofallops added this to the v3.50.0 milestone Mar 29, 2023
@jackofallops jackofallops merged commit b7f8502 into hashicorp:main Mar 30, 2023
jackofallops added a commit that referenced this pull request Mar 30, 2023
@github-actions
Copy link

This functionality has been released in v3.50.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!

@github-actions
Copy link

github-actions bot commented May 1, 2023

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 May 1, 2023
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.

5 participants