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.85k stars 9.2k forks source link

[Bug]: #40182

Open aanxel opened 4 days ago

aanxel commented 4 days ago

Terraform Core Version

0.14.7

AWS Provider Version

5.76.0

Affected Resource(s)

aws_sagemaker_domain aws_sagemaker_user_profile

Expected Behavior

When you create an aws_sagemaker_domain or aws_sagemaker_user_profile with custom_file_system_config, and once created you remove this property the resource should be properly modified and should remove this configuration.

Actual Behavior

When you create an aws_sagemaker_domain or aws_sagemaker_user_profile with custom_file_system_config, and once created you remove this property the resource keeps the configuration and every time you try to make a terraform apply or plan it appers as a resource to be changed but it never accepts the removal of this property.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_sagemaker_user_profile" "this" { user_settings { custom_file_system_config { efs_file_system_config { file_system_id = var.efs_space_id file_system_path = var.efs_space_path } } } }

Steps to Reproduce

Create a user with a custom_file_syste_config like: resource "aws_sagemaker_user_profile" "this" { user_settings { custom_file_system_config { efs_file_system_config { file_system_id = var.efs_space_id file_system_path = var.efs_space_path } } } }

It will perfectly create it. But when you modify the code to remove this property, it will be displayed as a resource to be changed in the terraform plan but this configuration will never be replace in the aws resource. And every time you try to make a terraform apply or terraform plan it will continue to be displayed as a resource to be changed. ~ user_settings {

(3 unchanged attributes hidden)

      - custom_file_system_config {
          - efs_file_system_config {
              - file_system_id   = "xx" -> null
              - file_system_path = "xx" -> null
            }
        }

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 4 days ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue