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
Describe the bug
Currently the "name" field in resources such as integration_gcp_resource is set to be optional but should be required to avoid the following error I encountered while writing and adding the slack integration:
Error: Provider produced inconsistent result after apply
When applying changes to mondoo_integration_slack.slack_abc, provider "provider[\"registry.terraform.io/mondoohq/mondoo\"]"
produced an unexpected new value: .name: was null, but now cty.StringVal("").
This is a bug in the provider, which should be reported in the provider's own issue tracker.
To Reproduce
Use any of the examples that have a "name" field as an optional parameter and try to run terraform apply while not providing the field e.g.:
terraform {
required_providers {
mondoo = {
source = "mondoohq/mondoo"
}
}
}
provider "mondoo" {
region = "us"
}
resource "mondoo_space" "my_space" {
name = "My Space Name"
# space_id = "your-space-id" # optional
org_id = "your-org-1234567"
}
resource "mondoo_integration_oci_tenant" "tenant_abc" {
space_id = mondoo_space.my_space.id
# name = "tenant ABC" remove this line !
tenancy = "ocid1.tenancy.oc1..aaaaaaaavvvvvvvvwwwwwwwwxxxxxx..."
region = "us-ashburn-1"
user = "ocid1.user.oc1..aaaaaaaabbbbbbbbccccccccddddeeeeee..."
credentials = {
fingerprint = "12:34:56:78:9a:bc:de:f1:23:45:67:89:ab:cd:ef:12"
private_key = <<EOT
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCf2kWtE6JkkP6E
cnQx/1oa4GqFs23nJFBQhgn9AThqAyUC1ilLQV9ZKjQj5/6+ljq/i4H/zU5lt2yB
....
qpbiCwjFYHmjWFygtYPhRH4T5TEzu4DXhjr4nn99sF0QFKcYkcTSIm7aZppYG4OS
1fnF+XoTcyFIGcSX/I1ND/4=
-----END PRIVATE KEY-----
EOT
}
}
Expected behavior
The expected behaviour would be a CLI output stating that the field "name" is missing but required:
Error: Missing required argument
on resource.tf line 18, in resource "mondoo_integration_slack" "slack_abc":
18: resource "mondoo_integration_slack" "slack_abc" {
The argument "name" is required, but no definition was found.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently the "name" field in resources such as integration_gcp_resource is set to be optional but should be required to avoid the following error I encountered while writing and adding the slack integration:
To Reproduce
Use any of the examples that have a "name" field as an optional parameter and try to run
terraform apply
while not providing the field e.g.:Expected behavior
The expected behaviour would be a CLI output stating that the field "name" is missing but required:
The text was updated successfully, but these errors were encountered: