Skip to content

Commit

Permalink
remove image_build_compute_name as this is ML specific and not valid …
Browse files Browse the repository at this point in the history
…for AI foundry
  • Loading branch information
stephybun committed Dec 10, 2024
1 parent afa745d commit ee4f9a4
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 40 deletions.
16 changes: 0 additions & 16 deletions internal/services/machinelearning/ai_foundry_project_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ type AIFoundryProjectModel struct {
AIServicesHubId string `tfschema:"ai_services_hub_id"`
Identity []identity.ModelSystemAssignedUserAssigned `tfschema:"identity"`
HighBusinessImpactEnabled bool `tfschema:"high_business_impact_enabled"`
ImageBuildComputeName string `tfschema:"image_build_compute_name"`
Description string `tfschema:"description"`
FriendlyName string `tfschema:"friendly_name"`
ProjectId string `tfschema:"project_id"`
Expand Down Expand Up @@ -103,12 +102,6 @@ func (r AIFoundryProject) Arguments() map[string]*pluginsdk.Schema {
ForceNew: true,
},

"image_build_compute_name": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},

"description": {
Type: pluginsdk.TypeString,
Optional: true,
Expand Down Expand Up @@ -193,10 +186,6 @@ func (r AIFoundryProject) Create() sdk.ResourceFunc {
payload.Properties.HbiWorkspace = pointer.To(model.HighBusinessImpactEnabled)
}

if model.ImageBuildComputeName != "" {
payload.Properties.ImageBuildCompute = pointer.To(model.ImageBuildComputeName)
}

if err = client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
return fmt.Errorf("creating %s: %+v", id, err)
}
Expand Down Expand Up @@ -246,10 +235,6 @@ func (r AIFoundryProject) Update() sdk.ResourceFunc {
payload.Properties.ApplicationInsights = nil
payload.Properties.Encryption = nil

if metadata.ResourceData.HasChange("image_build_compute_name") {
payload.Properties.ImageBuildCompute = pointer.To(state.ImageBuildComputeName)
}

if metadata.ResourceData.HasChange("description") {
payload.Properties.Description = pointer.To(state.Description)
}
Expand Down Expand Up @@ -324,7 +309,6 @@ func (r AIFoundryProject) Read() sdk.ResourceFunc {
hub.Description = pointer.From(props.Description)
hub.FriendlyName = pointer.From(props.FriendlyName)
hub.HighBusinessImpactEnabled = pointer.From(props.HbiWorkspace)
hub.ImageBuildComputeName = pointer.From(props.ImageBuildCompute)
hub.ProjectId = pointer.From(props.WorkspaceId)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ resource "azurerm_ai_foundry_project" "test" {
location = azurerm_ai_foundry.test.location
ai_services_hub_id = azurerm_ai_foundry.test.id
image_build_compute_name = "projectbuild"
description = "AI Project created by Terraform"
friendly_name = "AI Project"
high_business_impact_enabled = false
Expand Down Expand Up @@ -152,7 +151,6 @@ resource "azurerm_ai_foundry_project" "test" {
location = azurerm_ai_foundry.test.location
ai_services_hub_id = azurerm_ai_foundry.test.id
image_build_compute_name = "projectbuildupdate"
description = "AI Project updated by Terraform"
friendly_name = "AI Project for OS models"
high_business_impact_enabled = false
Expand Down
16 changes: 0 additions & 16 deletions internal/services/machinelearning/ai_foundry_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ type AIFoundryModel struct {
Identity []identity.ModelSystemAssignedUserAssigned `tfschema:"identity"`
PrimaryUserAssignedIdentity string `tfschema:"primary_user_assigned_identity"`
HighBusinessImpactEnabled bool `tfschema:"high_business_impact_enabled"`
ImageBuildComputeName string `tfschema:"image_build_compute_name"`
Description string `tfschema:"description"`
FriendlyName string `tfschema:"friendly_name"`
DiscoveryUrl string `tfschema:"discovery_url"`
Expand Down Expand Up @@ -200,12 +199,6 @@ func (r AIFoundry) Arguments() map[string]*pluginsdk.Schema {
ValidateFunc: validation.StringInSlice(workspaces.PossibleValuesForPublicNetworkAccess(), false),
},

"image_build_compute_name": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},

"description": {
Type: pluginsdk.TypeString,
Optional: true,
Expand Down Expand Up @@ -316,10 +309,6 @@ func (r AIFoundry) Create() sdk.ResourceFunc {
payload.Properties.HbiWorkspace = pointer.To(model.HighBusinessImpactEnabled)
}

if model.ImageBuildComputeName != "" {
payload.Properties.ImageBuildCompute = pointer.To(model.ImageBuildComputeName)
}

if model.PrimaryUserAssignedIdentity != "" {
userAssignedId, err := commonids.ParseUserAssignedIdentityID(model.PrimaryUserAssignedIdentity)
if err != nil {
Expand Down Expand Up @@ -396,10 +385,6 @@ func (r AIFoundry) Update() sdk.ResourceFunc {
payload.Properties.PublicNetworkAccess = pointer.To(workspaces.PublicNetworkAccess(state.PublicNetworkAccess))
}

if metadata.ResourceData.HasChange("image_build_compute_name") {
payload.Properties.ImageBuildCompute = pointer.To(state.ImageBuildComputeName)
}

if metadata.ResourceData.HasChange("description") {
payload.Properties.Description = pointer.To(state.Description)
}
Expand Down Expand Up @@ -508,7 +493,6 @@ func (r AIFoundry) Read() sdk.ResourceFunc {
hub.Description = pointer.From(props.Description)
hub.FriendlyName = pointer.From(props.FriendlyName)
hub.HighBusinessImpactEnabled = pointer.From(props.HbiWorkspace)
hub.ImageBuildComputeName = pointer.From(props.ImageBuildCompute)
hub.PublicNetworkAccess = string(*props.PublicNetworkAccess)
hub.DiscoveryUrl = pointer.From(props.DiscoveryURL)
hub.WorkspaceId = pointer.From(props.WorkspaceId)
Expand Down
2 changes: 0 additions & 2 deletions internal/services/machinelearning/ai_foundry_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ resource "azurerm_ai_foundry" "test" {
container_registry_id = azurerm_container_registry.test.id
primary_user_assigned_identity = azurerm_user_assigned_identity.test.id
public_network_access = "Disabled"
image_build_compute_name = "buildtest"
description = "AI Hub created by Terraform"
friendly_name = "AI Hub"
high_business_impact_enabled = true
Expand Down Expand Up @@ -279,7 +278,6 @@ resource "azurerm_ai_foundry" "test" {
container_registry_id = azurerm_container_registry.test.id
primary_user_assigned_identity = azurerm_user_assigned_identity.test2.id
public_network_access = "Enabled"
image_build_compute_name = "buildtestupdated"
description = "AI Hub for Projects"
friendly_name = "AI Hub for OS models"
high_business_impact_enabled = true
Expand Down
2 changes: 0 additions & 2 deletions website/docs/r/ai_foundry.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ The following arguments are supported:

-> **Note:** `high_business_impact_enabled` will be enabled by default when creating an AI Foundry Hub with `encryption` enabled.

* `image_build_compute_name` - (Optional) The compute name for image build of the AI Foundry Hub.

* `managed_network` - (Optional) A `managed_network` block as defined below.

* `primary_user_assigned_identity` - (Optional) The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity.
Expand Down
2 changes: 0 additions & 2 deletions website/docs/r/ai_foundry_project.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ The following arguments are supported:

* `identity` - (Optional) A `identity` block as defined below.

* `image_build_compute_name` - (Optional) The compute name for image build of the AI Foundry Project.

* `tags` - (Optional) A mapping of tags which should be assigned to the AI Foundry Project.

---
Expand Down

0 comments on commit ee4f9a4

Please sign in to comment.