hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.86k stars 9.21k forks source link

Add ability to add features to existing feature groups in Sagemaker #26809

Open aShevc opened 2 years ago

aShevc commented 2 years ago

Community Note

Description

Currently when one adds new feature to the existing Sagemaker feature group, it forces the destruction of resource. However, since FeatureAdditions functionality has been introduced to the UpdateFeatureGroup API call, this must not be the case.

New or Affected Resource(s)

Potential Terraform Example

resource "aws_sagemaker_feature_group" "feature_group" {
  feature_group_name                   = "some name"
// ...rest of the configuration and features

// the feature definition below is the new feature in he feature group
    feature_definition {
      feature_name = "example_add"
      feature_type  = string
    }
}

Expected Behavior

When adding a feature to feature group, the feature group should be updated with the new feature.

Actual Behavior

Executing Terraform plan gives the following:

  # aws_sagemaker_feature_group.feature_group[0] must be replaced
-/+ resource "aws_sagemaker_feature_group" "feature_group" {

      + feature_definition { # forces replacement
          + feature_name = "example_add"
          + feature_type = "String"
        }
...

    }

Plan: 1 to add, 0 to change, 1 to destroy.

References

DrFaust92 commented 2 years ago

looking into this

xianwill commented 2 years ago

@DrFaust92 just wanted to see if you were able to make any progress on this?

DrFaust92 commented 2 years ago

@xianwill im looking into this but unfortunately this proved to not as trivial as removal of features requires recreate and i wasnt able to make this work properly in my tests. if anyone wants to take a crack at this i can unassign myself as this is not a top priority ticket for me.

aShevc commented 2 years ago

@DrFaust92 I have started looking at the issue, however, similarly, struggle to make Terraform force changes in case if the list of feature definitions change simultaneously with giving the ability to add new features. Can you share some of your work so I could have a sneak peek on potential solutions?

nealrp commented 1 year ago

Any update on this? Full recreation limits use of this resource since all data stored in the feature also gets deleted.

lsamaha1-chwy commented 5 months ago

Any updates on getting a release with this support?

mpwsh commented 3 weeks ago

please updates on this issue? any way we can help get this work started?