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

deprecate the default_naming_prefix, default_naming_suffix and removing_special_chars #397

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
BUG FIXES:
- Fix a bug that `ignore_body_changes` incorrectly removes tags.

NOTICE:
- Provider field `default_naming_prefix` and `default_naming_suffix` are deprecated. It will not work in the next minor release and will be removed in the next major release.
Please specify the naming prefix and suffix in the resource's `name` field instead.
- The `azapi_resource`'s `removing_special_chars` field is deprecated. It will not work in the next minor release and will be removed in the next major release.
Please specify the `name` field and remove the special characters in the `name` field instead.
- Defining the `identity` inside the `body` field is not recommended. In the next minor release, it will not sync the `identity` inside the `body` field to `identity` block.
Please define the `identity` block instead.

## v1.11.0
ENHANCEMENTS:
- `azapi_resource_action` resource: Support `HEAD` method.
Expand Down
9 changes: 6 additions & 3 deletions internal/azure/resourceName/resourceName.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func SchemaResourceNamePrefix() *schema.Schema {
return &schema.Schema{
Type: schema.TypeString,
Optional: true,
Deprecated: "It will not work in the next minor release and will be removed in the next major release. Please specify the naming prefix and suffix in the resource's `name` field instead.",
ConflictsWith: []string{"default_name"},
}
}
Expand All @@ -31,14 +32,16 @@ func SchemaResourceNameSuffix() *schema.Schema {
return &schema.Schema{
Type: schema.TypeString,
Optional: true,
Deprecated: "It will not work in the next minor release and will be removed in the next major release. Please specify the naming prefix and suffix in the resource's `name` field instead.",
ConflictsWith: []string{"default_name"},
}
}

func SchemaResourceNameRemovingSpecialCharacters() *schema.Schema {
return &schema.Schema{
Type: schema.TypeBool,
Optional: true,
Default: false,
Type: schema.TypeBool,
Optional: true,
Deprecated: "It will not work in the next minor release and will be removed in the next major release. Please specify the `name` field and remove the special characters in the `name` field instead.",
Default: false,
}
}
Loading