-
Notifications
You must be signed in to change notification settings - Fork 99
Closed as duplicate of#805
Closed as duplicate of#805
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Module version
github.com/hashicorp/terraform-plugin-framework v1.15.1
Relevant provider source code
...Terraform Configuration Files
terraform {
required_providers {
mongodbatlas = {
source = "mongodb/mongodbatlas"
version = "1.39.0"
}
}
required_version = ">= 1.0"
}
resource "mongodbatlas_project" "test" {
name = "tf-sharded-repro-project-sdkv2"
org_id = "...."
}
resource "mongodbatlas_stream_instance" "example" {
project_id = mongodbatlas_project.test.id
instance_name = "InstanceName"
data_process_region = {
region = "VIRGINIA_USA"
cloud_provider = "AWS"
}
}
resource "mongodbatlas_stream_connection" "example-kafka-plaintext" {
project_id = mongodbatlas_project.test.id
instance_name = mongodbatlas_stream_instance.example.instance_name
connection_name = "KafkaPlaintextConnection"
type = "Kafka"
authentication = {
mechanism = "PLAIN"
username = "kafka_username1"
password = "kafka_password"
}
bootstrap_servers = "localhost:9092,localhost:9092"
config = {
"auto.offset.reset" : "earliest"
}
security = {
protocol = "SASL_PLAINTEXT"
}
networking = {
access = {
type = "PUBLIC"
xxx = "does not exist" # this attribute does not exist in the schema
}
}
}Debug Output
Expected Behavior
terraform plan should have thrown an error like "An argument named "xxx" is not expected here." for mongodbatlas_stream_connection resource.
Actual Behavior
terraform plan succeeds & ignores any changes to xxx attribute. If such an attribute is added at the root level of the resource, then Terraform does throw this error but not if the unexpected attribute is inside a nested attribute.
Steps to Reproduce
terraform initterraform apply-> succeeds- add an unexpected attribute at root level in any resource implemented with Terraform plugin framework such as:
resource "mongodbatlas_project" "test" {
name = "tf-sharded-repro-project-sdkv2"
org_id = "....."
xxx = "does not exist"
}
terraform apply-> throws error "An argument named "xxx" is not expected here."
References
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working