Skip to content

Commit

Permalink
feat: spaceID support aws ecs feed
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicsim1 committed Oct 16, 2023
1 parent b8d47aa commit f51b7b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions octopusdeploy/resource_aws_elastic_container_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func resourceAwsElasticContainerRegistryCreate(ctx context.Context, d *schema.Re
tflog.Info(ctx, fmt.Sprintf("creating AWS Elastic Container Registry, %s", feed.GetName()))

client := m.(*client.Client)
createdFeed, err := client.Feeds.Add(feed)
createdFeed, err := feeds.Add(client, feed)
if err != nil {
return diag.FromErr(err)
}
Expand All @@ -52,7 +52,7 @@ func resourceAwsElasticContainerRegistryDelete(ctx context.Context, d *schema.Re
tflog.Info(ctx, fmt.Sprintf("deleting AWS Elastic Container Registry (%s)", d.Id()))

client := m.(*client.Client)
err := client.Feeds.DeleteByID(d.Id())
err := feeds.DeleteByID(client, d.Get("space_id").(string), d.Id())
if err != nil {
return diag.FromErr(err)
}
Expand All @@ -67,7 +67,7 @@ func resourceAwsElasticContainerRegistryRead(ctx context.Context, d *schema.Reso
tflog.Info(ctx, fmt.Sprintf("reading AWS Elastic Container Registry (%s)", d.Id()))

client := m.(*client.Client)
feed, err := client.Feeds.GetByID(d.Id())
feed, err := feeds.GetByID(client, d.Get("space_id").(string), d.Id())
if err != nil {
return errors.ProcessApiError(ctx, d, err, "AWS Elastic Container Registry")
}
Expand All @@ -90,7 +90,7 @@ func resourceAwsElasticContainerRegistryUpdate(ctx context.Context, d *schema.Re
tflog.Info(ctx, fmt.Sprintf("updating AWS Elastic Container Registry (%s)", awsElasticContainerRegistry.GetID()))

client := m.(*client.Client)
updatedFeed, err := client.Feeds.Update(awsElasticContainerRegistry)
updatedFeed, err := feeds.Update(client, awsElasticContainerRegistry)
if err != nil {
return diag.FromErr(err)
}
Expand Down
1 change: 1 addition & 0 deletions octopusdeploy/schema_aws_elastic_container_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func getAwsElasticContainerRegistrySchema() map[string]*schema.Schema {
Description: "The space ID associated with this feed.",
Optional: true,
Type: schema.TypeString,
ForceNew: true,
},
}
}
Expand Down

0 comments on commit f51b7b9

Please sign in to comment.