You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated plan should only contains 1 resource to import without any other changes as the service account being imported is already linked to the right role
Terraform will perform the following actions:
# datadog_service_account.laurent_test_tf will be imported
resource "datadog_service_account" "foo" {
disabled = false
email = "[email protected]"
id = "016083b9-bcab-4ceb-a936-d94e9b1b24fa"
name = "foo"
roles = [
"5e1c835b-f483-4af0-8b94-b38434898169",
]
}
Plan: 1 to import, 0 to add, 0 to change, 0 to destroy.
Actual Behavior
The generated plan contains 1 import and 1 change as terraform is not aware of the roles for this imported service account.
Terraform will perform the following actions:
# datadog_service_account.foo will be updated in-place
# (imported from "016083b9-bcab-4ceb-a936-d94e9b1b24fa")
~ resource "datadog_service_account" "laurent_test_tf" {
disabled = false
email = "[email protected]"
id = "016083b9-bcab-4ceb-a936-d94e9b1b24fa"
name = "TEST TF"
+ roles = [
+ "5e1c835b-f483-4af0-8b94-b38434898169",
]
}
Plan: 1 to import, 0 to add, 1 to change, 0 to destroy.
Steps to Reproduce
Create a datadog_service_account resource with a role
Remove this instance from the TF state (terraform state rm datadog_service_account.foo)
Add the import block to import the resource created in the first step
Run terraform plan
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
Datadog Terraform Provider Version
v3.5
Terraform Version
1.10.2
What resources or data sources are affected?
datadog_service_account
Terraform Configuration Files
Relevant debug or panic output
https://github.com/DataDog/terraform-provider-datadog/blob/master/datadog/fwprovider/resource_datadog_service_account.go#L268.
This function used to read a service account doesn't seem to take into account the roles provided in the api response if none were known in the state before
Expected Behavior
The generated plan should only contains 1 resource to import without any other changes as the service account being imported is already linked to the right role
Actual Behavior
The generated plan contains 1 import and 1 change as terraform is not aware of the roles for this imported service account.
Steps to Reproduce
terraform state rm datadog_service_account.foo
)terraform plan
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: