-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
new resource azurerm_synapse_sql_pool
#8095
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.
Thanks @njuCZ - aside from a few minor comments this looks pretty good
@katbyte I have refined my PR, could you please have a look again? |
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.
39aa39f
to
67edd50
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.
hi @njuCZ
Thanks for this PR.
I've taken a look through here and left some comments inline - but this is off to a good start. If we can fix up the comments then we should be able to take another look through here.
Thanks!
"data_encrypted": { | ||
Type: schema.TypeBool, | ||
Optional: true, | ||
}, |
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.
this looks like a value that'll change in the future:
a) is this defaulted off?
b) is this going to change to on
in the future?
c) is this not a ForceNew field like in many other API's?
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.
a) for now, it's default "off"
b) I am sorry that I don't know whether it will change default value in the future
c) it's a updatable field. I don't see similiar fields in other API?
|
||
* `create_mode` - (Optional) Specifies how to create the Sql Pool. Valid values are: `Default`, `Recovery` or `PointInTimeRestore`. Must be `Default` to create a new database. Defaults to `Default`. | ||
|
||
* `collation` - (Optional) The name of the collation to use with this pool. Applies only if `create_mode` is `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new resource to be created. |
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.
we should default this within Terraform too:
* `collation` - (Optional) The name of the collation to use with this pool. Applies only if `create_mode` is `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new resource to be created. | |
* `collation` - (Optional) The name of the collation to use with this pool, only applicable when `create_mode` is set to `Default`. Defaults to `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new resource to be created. |
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.
we could not add default value here, the reason is as below
Type: schema.TypeString, | ||
Optional: true, | ||
Computed: true, | ||
ForceNew: true, |
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.
(as below) this should probably be defaulted
I believe we've also got validation for collations somewhere in the codebase we could use here
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.
I have added validation. But I think this field should not have default value. Because in "recovery" or "restore" createmode, the "collation" is the same with the sourceDatabase, but not what user input. If there is a default value, it might cause diff in this case.
67edd50
to
75c3455
Compare
@tombuildsstuff I have modifed this PR, could you please have a look again? |
Hi @njuCZ - Is there a reason this is leveraging/updating |
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.
Thanks @njuCZ - LGTM 👍
@jackofallops sorry that I understand the relation between sql and mssql just now. Since this PR has been merged, and only parse function and validation function from sql package is used. I will change to use functions from mssql. This is not breaking change and I will submit follow up PR to do this #8434 . Thanks for your suggestion |
This has been released in version 2.28.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.28.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 👉 hashibot-feedback@hashicorp.com. Thanks! |
the third resource of #7406
it needs to take a long time to run test for PointInTime restore (8h according to the doc) and recovery (1 day), so I don't add test case for these two create mode. I have tested it offline and there is no problem
(fixes #7406)