Closed tagur87 closed 2 months ago
@tagur87 please try it with new version and update us.
I was able to get it to work, but still ran into some other errors.
If you try to create the opt_in without the opt_in_id
field defined, you get this error:
meraki_organizations_early_access_features_opt_ins.this: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to meraki_organizations_early_access_features_opt_ins.this, provider "provider[\"registry.terraform.io/cisco-open/meraki\"]" produced an unexpected new value: .opt_in_id: was null, but now cty.StringVal("762234236932510422").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
You can get around this by setting opt_in_id
to ""
, however this should not be required.
After applying and adding the opt in using the above "trick", you cannot destroy the parameter to remove the opt in. You get an error on the destroy like follows:
data.meraki_organizations_early_access_features.this: Reading...
meraki_organizations_early_access_features_opt_ins.this: Refreshing state... [id=762234236932510424]
data.meraki_organizations_early_access_features.this: Read complete after 0s
╷
│ Error: Failure when executing GetOrganizationEarlyAccessFeaturesOptIn
│
│ with meraki_organizations_early_access_features_opt_ins.this,
│ on main.tf line 20, in resource "meraki_organizations_early_access_features_opt_ins" "this":
│ 20: resource "meraki_organizations_early_access_features_opt_ins" "this" {
│
│ json: cannot unmarshal array into Go value of type meraki.ResponseOrganizationsGetOrganizationEarlyAccessFeaturesOptIn
╵
Not sure why opt_in_id
is even in the terraform resource as a parameter? ACcording to the API docs, there is no such field returned. https://developer.cisco.com/meraki/api-v1/create-organization-early-access-features-opt-in/
Just the id
field, which can then be used as then optInId
in the URL to read the id. https://developer.cisco.com/meraki/api-v1/get-organization-early-access-features-opt-ins/
Seems this is some bug in the provider generator code.
Please try it with new version and update us.
This worked. Thanks for the help.
Prerequisites
Describe the bug When trying to configure organization level early opt in features, with the below configuration (no limiting scope to network), we get a type conversion error.
Relevant Configuration
Error
Expected behavior Opt in early access feature would work successfully, as it does in the API.
Screenshots
Environment (please complete the following information):
Additional context
Trace Logs: