-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add limited support for blueprint assignments #6930
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jackofallops thanks for this PR!
I have been asked for the blueprints quite a few times... Glad to see this resource back to track.
Despite this is still in draft, I have a little suggestion, please see the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jackofallops Thanks for the great. I made some suggestion on the design of the scope
part (and the related ID parsing functions). I assume it should be better to raise these when the PR is still in draft. I personally prefer to unify the scope
by introducing one attribute called scope_id
instead of when using different scopes, the user has to assign different attribute. What do you think?
} | ||
|
||
switch idParts[0] { | ||
case "providers": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar concern with blueprint ID
azurerm/internal/services/blueprints/parse/blueprint_version.go
Outdated
Show resolved
Hide resolved
} | ||
|
||
switch idParts[0] { | ||
case "providers": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we already have a parsing function of Management Group IDs in the managementgroup/parse
directory, and also in the managementgroup
directory, we have a little function used for parsing an ID of a subscription (like /subscriptions/00000000-0000-0000-0000-000000000000/
)
Could we please reuse those logic here? I suppose the logic here to parse the ID is too complicated.
We could first split the ID by using this part /providers/Microsoft.Blueprint
and then the first part should be the scope ID, and the last part should be all the information about its own.
azurerm/internal/services/blueprints/tests/blueprint_assignment_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/blueprints/blueprint_definition_datasource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/blueprints/blueprint_definition_datasource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/blueprints/blueprint_published_version_datasource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/blueprints/blueprint_published_version_datasource.go
Outdated
Show resolved
Hide resolved
511a0e6
to
280c978
Compare
298db76
to
be1b175
Compare
f67497a
to
33b5a7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some minor extra checks and an ask for a test that updates the resource
azurerm/internal/services/blueprints/blueprint_assignment_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/blueprints/blueprint_assignment_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/blueprints/tests/blueprint_assignment_resource_test.go
Show resolved
Hide resolved
This has been released in version 2.14.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.14.0"
}
# ... other configuration ... |
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! |
Blocked on testing capability in CI Environment
WIP flagged until new CI environment ready.
Local tests Passing:
co-authored-by: @ArcturusZhang