-
Notifications
You must be signed in to change notification settings - Fork 10
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
Creation of Project Roles using Terraform #85
Comments
@EvertonSA Are you currently using the |
@EvertonSA I'm working on this currently and this is what I'm adding:
So if you are currently using If you wish to use the new resource "project" "myproj" {
key = "myprojkey"
use_project_role_resource = true
...
// no `role` attribute
}
resource "project_role" "myrole" {
name = "myrole"
project_key = "myprojectkey"
...
} This should take care of both existing configuration and new comers. At some point in the future (6 months?), |
👍🏿 |
We're looking at the migration to this now. Just something we've noticed, it appears that if you already have roles against a project the 'old' way (project.roles) and you want to move to the new way (project_role) then I think you're going to have to trash the old roles and create new ones. We're on version 1.2.1 and we're moving to 1.3.2. Terraform will tell you about the new roles to be created in the plan, but fail because a role with the same name already exists:
The only way that seems to work around this is to come up with different naming for the roles we create post the upgrade to the newer version of the provider, or some workaround to change the names of the old one outside of Terraform. |
@mikeycmccarthy So the process to migrate from using the old attribute
resource "project" "test-proj" {
key = "testproj"
roles = ["Test Role"]
}
resource "project" "test-proj" {
roles = ["Test Role"]
}
resource "project_role" "test-role" {
name = "Test-Role"
project_key = project.test-proj.key
}
terraform import project_role.test-role testproj:Test-Role
resource "project" "test-proj" {
key = "testproj"
roles = ["Test Role"]
use_project_role_resource = true
}
Let me know if this process works for you. If so, I can incorporate this into a migration guide as part of the documentation. (Also, I just notice the documentation for |
I as a Platform engineer would like to provision Project Roles using terraform.
similar to as implemented here #78
The text was updated successfully, but these errors were encountered: