Replacement for overwrite=true in aws_ssm_parameter#database_url

Since the overwrite attribute is deprecated in aws_ssm_parameter#database_url, I am looking for its replacement.
I have added:

  lifecycle {
    ignore_changes = [

When I add update block, I get Unsupported block type error.

Please clarify.


Based on the provider team’s explanation of this deprecation I’m understanding that they’ve intentionally deprecated this without direct replacement because the capability to silently overwrite an existing object is problematic in Terraform’s workflow: it can cause you to inadvertently end up managing the same SSM parameter in two different Terraform configurations which would then conflict with one another and you’d never reach convergence.

You haven’t mentioned what you were intending to achieve by using overwrite = true, so I can’t suggest a specific replacement. There may not actually be a direct replacement if what you were doing is the action that this deprecation was intending to prevent.

If (and only if) your intention is to take an SSM Parameter that was originally managed by Terraform and manage it exclusively using this Terraform configuration in future, you can declare that by writing an import block to declare that you want Terraform to assume ownership of this object, as shown in the linked issue comment:

import {
  to = aws_ssm_parameter.example
  id = "/some/param"

resource "aws_ssm_parameter" "example" {
  name = "/some/param"
  # (other resource arguments...)

If your goal is not to give your Terraform configuration exclusive ownership of an object originally created outside of Terraform then this is not an appropriate solution. Please describe more about what you intend to achieve.

The intention is to always upsert SSM Parameters.
Setting Overwrite = true allows the modification of existing ssm parameter.