diff --git a/.changes/unreleased/Refactor-20231020-134153.yaml b/.changes/unreleased/Refactor-20231020-134153.yaml new file mode 100644 index 00000000..aeb6891d --- /dev/null +++ b/.changes/unreleased/Refactor-20231020-134153.yaml @@ -0,0 +1,3 @@ +kind: Refactor +body: BREAKING CHANGE ownerAlias deprecated on service inputs +time: 2023-10-20T13:41:53.279163-04:00 diff --git a/src/cmd/service.go b/src/cmd/service.go index 0ad3ec5c..b0253e5a 100644 --- a/src/cmd/service.go +++ b/src/cmd/service.go @@ -30,7 +30,8 @@ product: "OSS" language: "Go" tier: "tier_4" framework: "fasthttp" -owner: "Platform" +owner: + alias: "Platform" EOF`, Run: func(cmd *cobra.Command, args []string) { input, err := readServiceCreateInput() @@ -207,15 +208,15 @@ EOF } } lifecycle := reader.Text("Lifecycle") - if tier != "" { + if lifecycle != "" { if item, ok := opslevel.Cache.Lifecycles[lifecycle]; ok { input.Lifecycle = item.Alias } } owner := reader.Text("Owner") - if tier != "" { + if owner != "" { if item, ok := opslevel.Cache.Teams[owner]; ok { - input.Owner = item.Alias + input.Owner = opslevel.NewIdentifier(item.Alias) } } service, err := getClientGQL().CreateService(input) diff --git a/src/cmd/terraform.go b/src/cmd/terraform.go index 14f07456..d8b77cb8 100644 --- a/src/cmd/terraform.go +++ b/src/cmd/terraform.go @@ -227,7 +227,7 @@ func flattenTier(value opslevel.Tier) string { func flattenOwner(value opslevel.TeamId) string { if value.Id != "" { - return fmt.Sprintf("owner_alias = opslevel_team.%s.alias", value.Alias) + return fmt.Sprintf("owner = opslevel_team.%s.alias", value.Alias) } return "" } diff --git a/src/submodules/opslevel-go b/src/submodules/opslevel-go index 0232a5bc..8ec23efb 160000 --- a/src/submodules/opslevel-go +++ b/src/submodules/opslevel-go @@ -1 +1 @@ -Subproject commit 0232a5bc2b8ca753d9150a46e3f74abd45ea3534 +Subproject commit 8ec23efbea530ebf57b5eba4886162f252328f17