Skip to content

Commit

Permalink
Fix in resource floor, source data must be an array for set parameters.
Browse files Browse the repository at this point in the history
#188 - new version 1.1.14-beta
  • Loading branch information
DbarrantesE committed Sep 6, 2023
1 parent 02b53fb commit 908fe49
Show file tree
Hide file tree
Showing 189 changed files with 207 additions and 191 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.14-beta (September 06, 2023)
BUGFIXES:
* Fix in resource floor, source data must be an array for set parameters. #188

## 1.1.13-beta (September 05, 2023)
BUGFIXES:
* Fix in resource building, inconsistency with parent_name modification, updated Terraform output. #197
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOSTNAME=hashicorp.com
NAMESPACE=edu
NAME=dnacenter
BINARY=terraform-provider-${NAME}
VERSION=1.1.13-beta
VERSION=1.1.14-beta
OS_ARCH=darwin_amd64
# Change to OS_ARCH=darwin_arm64 or your current architecture
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The following table shows the supported versions.
| 2.2.3.3 | 0.3.0-beta |
| 2.2.3.3 | 0.3.0 |
| 2.3.3.0 | 1.0.19-beta |
| 2.3.5.3 | 1.1.13-beta |
| 2.3.5.3 | 1.1.14-beta |

If your SDK, Terraform provider is older please consider updating it first.

Expand Down Expand Up @@ -66,7 +66,7 @@ terraform {
required_providers {
dnacenter = {
source = "cisco-en-programmability/dnacenter"
version = "1.1.13-beta"
version = "1.1.14-beta"
}
}
}
Expand Down
18 changes: 15 additions & 3 deletions dnacenter/data_source_site.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ func flattenSitesGetSiteParams(items *[]dnacentersdkgo.ResponseSitesGetSiteRespo
}
respParams["type"] = "building"
if len(parameters) > 0 {
respParams["site_id"] = parameters[0].(map[string]interface{})["site_id"].(string)
if parameters[0].(map[string]interface{})["site_id"] == nil || parameters[0].(map[string]interface{})["site_id"].(string) == "" {
log.Print("[DEBUG] site_id Not setted")
} else {
respParams["site_id"] = parameters[0].(map[string]interface{})["site_id"].(string)
}
}

return respParams
Expand Down Expand Up @@ -333,7 +337,11 @@ func flattenSitesGetFloorParams(items *[]dnacentersdkgo.ResponseSitesGetFloorRes
}
respParams["type"] = "floor"
if len(parameters) > 0 {
respParams["site_id"] = parameters[0].(map[string]interface{})["site_id"].(string)
if parameters[0].(map[string]interface{})["site_id"] == nil || parameters[0].(map[string]interface{})["site_id"].(string) == "" {
log.Print("[DEBUG] site_id Not setted")
} else {
respParams["site_id"] = parameters[0].(map[string]interface{})["site_id"].(string)
}
}

return respParams
Expand Down Expand Up @@ -363,7 +371,11 @@ func flattenSitesGetAreaParams(items *[]dnacentersdkgo.ResponseSitesGetAreaRespo

respParams["type"] = "area"
if len(parameters) > 0 {
respParams["site_id"] = parameters[0].(map[string]interface{})["site_id"].(string)
if parameters[0].(map[string]interface{})["site_id"] == nil || parameters[0].(map[string]interface{})["site_id"].(string) == "" {
log.Print("[DEBUG] site_id Not setted")
} else {
respParams["site_id"] = parameters[0].(map[string]interface{})["site_id"].(string)
}
}
return respParams

Expand Down
2 changes: 1 addition & 1 deletion dnacenter/resource_floor.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func resourceFloorRead(ctx context.Context, d *schema.ResourceData, m interface{

vItem2 := flattenSitesGetFloorParams(response1.Response, parameters)
log.Printf("[DEBUG] response flatten sent => %v", responseInterfaceToString(vItem2))
if err := d.Set("parameters", vItem2); err != nil {
if err := d.Set("parameters", []map[string]interface{}{vItem2}); err != nil {
diags = append(diags, diagError(
"Failure when setting GetSite search response",
err))
Expand Down
2 changes: 1 addition & 1 deletion examples/samples/data-sources/dnacenter_app_policy/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
terraform {
required_providers {
dnacenter = {
version = "1.1.13-beta"
version = "1.1.14-beta"
source = "hashicorp.com/edu/dnacenter"
# "hashicorp.com/edu/dnacenter" is the local built source, change to "cisco-en-programmability/dnacenter" to use downloaded version from registry
}
Expand Down
Loading

0 comments on commit 908fe49

Please sign in to comment.