Skip to content
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

[UX2.0] Errors when pushing basic parcel #240

Open
tzarski0 opened this issue May 7, 2024 · 0 comments
Open

[UX2.0] Errors when pushing basic parcel #240

tzarski0 opened this issue May 7, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tzarski0
Copy link

tzarski0 commented May 7, 2024

Push of basic parcel fails with:

│ Error: Configuration Read Error
│ 
│   with module.sdwan.sdwan_system_basic_profile_parcel.system_basic_profile_parcel["system2-basic"],
│   on ../terraform-sdwan-nac-sdwan/sdwan_profile_parcels.tf line 152, in resource "sdwan_system_basic_profile_parcel" "system_basic_profile_parcel":
│  152:   gps_longitude                       = try(each.value.basic.longitude, null)
│ 
│ An unexpected error was encountered trying to convert an attribute value from the
│ configuration. This is always an error in the provider. Please report the following to the
│ provider developer:
│ 
│ Error: Value %!s(*big.Float=-10.1) is not an integer.
╵

I assume in resource_sdwan_system_basic_profile_parcel.go we should change:
From:

"gps_longitude": schema.Int64Attribute{
	MarkdownDescription: helpers.NewAttributeDescription("Set the device physical longitude").AddIntegerRangeDescription(-180, 180).String,
	Optional:            true,
	Validators: []validator.Int64{
		int64validator.Between(-180, 180),
	},
},
"gps_longitude_variable": schema.StringAttribute{
	MarkdownDescription: helpers.NewAttributeDescription("Variable name").String,
	Optional:            true,
},
"gps_latitude": schema.Int64Attribute{
	MarkdownDescription: helpers.NewAttributeDescription("Set the device physical latitude").AddIntegerRangeDescription(-90, 90).String,
	Optional:            true,
	Validators: []validator.Int64{
		int64validator.Between(-90, 90),
	},
},

to:

"gps_longitude": schema.Int64Attribute{
	MarkdownDescription: helpers.NewAttributeDescription("Set the device physical longitude").AddIntegerRangeDescription(-180, 180).String,
	Optional:            true,
	Validators: []validator.Float64{
		float64validator.Between(-180, 180),
	},
},
"gps_longitude_variable": schema.StringAttribute{
	MarkdownDescription: helpers.NewAttributeDescription("Variable name").String,
	Optional:            true,
},
"gps_latitude": schema.Int64Attribute{
	MarkdownDescription: helpers.NewAttributeDescription("Set the device physical latitude").AddIntegerRangeDescription(-90, 90).String,
	Optional:            true,
	Validators: []validator.Float64{
		float64validator.Between(-90, 90),
	},
},
@danischm danischm added the bug Something isn't working label May 8, 2024
@seconroy seconroy self-assigned this May 17, 2024
seconroy added a commit to seconroy/terraform-provider-sdwan that referenced this issue May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants