-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with fortios_vpnssl_settings authentication_rule #302
Comments
Hi @cgrard, Thank you for raising this issue. In your case, you need to add all pre-existing group/portal values in your TF configuration. By Terraform's design, Terraform providers should have full control of resources handled by Terraform. Otherwise, Terraform will be confusing whether the user wants to replace all by current value or just want to add a new one. Also, the backend REST API of FortiOS for this resource does not support only adding new group/portal values without affecting pre-existing values. Otherwise, we can create a new sub-resource for authentication rules only. Please let me know if you have any questions. Thanks, |
Thanks for the quick answer. I understand that Terraform should have full control of resources however this is not possible in our case because Terraform has been introduced lately on an existing infrastructure that already contains a lot of legacy content that we cannot import in Terraform. I know this is not ideal but our goal is to use Terraform from now on while keeping the legacy in place. When you say that you can create a new sub-resource for authentication rules only, does it mean that we would have a Isn't there a way to retrieve the list of existing authentication_rules using a data object and append the new resource to it? |
Hi @cgrard, We can add a new data source for it if that helps. As for the sub-resource of Authentication rules, we can not add it for now since we do not have a related public REST API. We will work with API team about this and will create a new resource for it if possible. Thanks, |
That would definitely help. Thanks |
Hi there,
Not sure if this is a bug or something since I'm fairly new to this provider, so I'll explain my problem and we'll see from there.
I create two resources, one is a
fortios_user_group
and the other is afortios_vpnsslweb_portal
, as follow:Both resources are properly created without error, the trouble comes with the next step.
I then need to create the
authentication_rule
to assign the new portal to the new group, and I do this as follow:Now technically this works as well, except that all the other group/portal values are gone and replaced by this one only. I should mention that the existing group/portal values are not covered by Terraform as they were pre-existing.
I'm not sure if it's the right thing to do, or if I'm doing it wrong, or how to go about it so that my resource is simply added to the others instead of replacing everything else.
Any help with this would be greatly appreciated!
The text was updated successfully, but these errors were encountered: