Closed clincha closed 4 months ago
Going to ignore IPv6 for now
Error: Provider produced inconsistent result after apply
When applying changes to proxmox_network_bridge.vmbr88, provider
"provider[\"registry.terraform.io/hashicorp/proxmox\"]" produced an
unexpected new value: .mtu: was null, but now cty.NumberIntVal(1500).
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
I tried to make the MTU default to 1500 in the Terraform code but then it needs to be Computed
Error: Failed to load plugin schemas
Error while loading schemas for plugin components: Failed to obtain provider
schema: Could not load the schema for provider
registry.terraform.io/hashicorp/proxmox: failed to retrieve schema from
provider "registry.terraform.io/hashicorp/proxmox": Schema Using Attribute
Default For Non-Computed Attribute: Attribute "mtu" must be computed when
using default. This is an issue with the provider and should be reported to
the provider developers...
I managed to finally figure out the inconsistent state issues. In the schema I have set values that are not required to have Computed
and Optional
set to true.
"gateway": schema.StringAttribute{
Optional: true,
Computed: true,
},
Then, when I'm running a Create command in Terraform, any values that are "Unknown" get set to nil
.
if plan.Gateway.IsUnknown() {
networkRequest.Gateway = nil
}
I have started creating a Terraform resource to manage a "network". This was too big of a start for me. I need to break the problem down into even smaller components. I think that will structure the code better.
I went back to the UI and I tried to create a network manually. I noticed that the UI also has different items for different types of network.
I think taking one item from the drop down and working on that until it works well is a better idea. I've decided to start at the top and create a bridge network. I think it's also the most simple.