We are starting to use this provider to manage existing resources inside a Redshift cluster. We use IAM roles for authentication, when doing so a user is automatically created in Redshift for the associated role, in our case the role is Admin and so the user that is created is called IAMR:Admin.
We have imported our existing schemas, but Terraform now wants to change the schema owner from IAMR:Admin to iamr:admin. When trying to apply this change we get an error:
The changes got merged and released with the newest version v1.9.0. Thank you for opening the issue! If the problem still persists, feel free to ping me again.
We are starting to use this provider to manage existing resources inside a Redshift cluster. We use IAM roles for authentication, when doing so a user is automatically created in Redshift for the associated role, in our case the role is
Admin
and so the user that is created is calledIAMR:Admin
.We have imported our existing schemas, but Terraform now wants to change the schema owner from
IAMR:Admin
toiamr:admin
. When trying to apply this change we get an error:I had a look at the code and I believe it is this line that is causing the issue, https://github.com/mmichaelb/terraform-provider-redshift/blob/main/redshift/resource_redshift_schema.go#L63.
Is the conversion to lowercase needed? If not, could it be removed? If it can be removed, another place where it would be useful to remove the lowercase conversion would be https://github.com/mmichaelb/terraform-provider-redshift/blob/main/redshift/data_source_redshift_user.go#L27, as we use this to read users that are automatically created when using IAM roles for authentication.
For now, I've worked around the issue by adding this to the schema resources: