Skip to content

Commit

Permalink
Merge pull request cloudfoundry-community#248 from innokenty/issue-24…
Browse files Browse the repository at this point in the history
…6-dev

Fix issue 246
  • Loading branch information
ArthurHlt authored Mar 25, 2020
2 parents b78a00f + 2366a40 commit 034c85f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cloudfoundry/migrate_bits.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func migrateBitsStateV2toV3(is *terraform.InstanceState, meta interface{}) (*ter
}
addContents := getListOfStructs(result.Value)
if len(addContents) > 0 {
return is, fmt.Errorf("add_content attribute can't be migrate, please fixeit in other way and remove from terraform.tfstate add_content attributes")
log.Printf("[WARN] Non-empty add_content attribute found. Skipping, but you might wanna migrate it's contentns manually: %#v", addContents)
}

u, err := migrateBitsUrl(rawUrl, git, github)
Expand Down
2 changes: 1 addition & 1 deletion cloudfoundry/resource_cf_app_migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func migrateAppStateV2toV3(is *terraform.InstanceState, meta interface{}) (*terr
}
if result.Exists {
oldRoute := getListOfStructs(result.Value)
if oldRoute[0]["default_route_mapping_id"].(string) != "" {
if len(oldRoute) > 0 && oldRoute[0]["default_route_mapping_id"].(string) != "" {
routes = append(routes, map[string]interface{}{
"route": oldRoute[0]["default_route_mapping_id"].(string),
"port": ports[0],
Expand Down

0 comments on commit 034c85f

Please sign in to comment.