Skip to content

Commit

Permalink
Merge branch 'main' into huy/update-schema-and-document
Browse files Browse the repository at this point in the history
  • Loading branch information
HuyPhanNguyen committed Aug 8, 2024
2 parents 4ee8639 + 3a8a027 commit c461ca0
Show file tree
Hide file tree
Showing 54 changed files with 516 additions and 297 deletions.
35 changes: 19 additions & 16 deletions docs/data-sources/feeds.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,40 @@ data "octopusdeploy_feeds" "example" {
### Optional

- `feed_type` (String) A filter to search by feed type. Valid feed types are `AwsElasticContainerRegistry`, `BuiltIn`, `Docker`, `GitHub`, `Helm`, `Maven`, `NuGet`, or `OctopusProject`.
- `feeds` (Block List) (see [below for nested schema](#nestedblock--feeds))
- `id` (String) The unique ID for this resource.
- `ids` (List of String) A filter to search by a list of IDs.
- `name` (String) A filter to search by name.
- `partial_name` (String) A filter to search by the partial match of a name.
- `name` (String) The name of this resource.
- `partial_name` (String) A filter to search by a partial name.
- `skip` (Number) A filter to specify the number of items to skip in the response.
- `space_id` (String) The space ID associated with this resource.
- `space_id` (String) The space ID associated with this feeds.
- `take` (Number) A filter to specify the number of items to take (or return) in the response.

### Read-Only

- `feeds` (Block List) A list of feeds that match the filter(s). (see [below for nested schema](#nestedblock--feeds))
- `id` (String) The ID of this resource.

<a id="nestedblock--feeds"></a>
### Nested Schema for `feeds`

Read-Only:
Required:

- `access_key` (String) The AWS access key to use when authenticating against Amazon Web Services.
- `feed_uri` (String)
- `name` (String) The name of this resource.

Optional:

- `access_key` (String)
- `api_version` (String)
- `delete_unreleased_packages_after_days` (Number)
- `download_attempts` (Number) The number of times a deployment should attempt to download a package from this feed before failing.
- `download_retry_backoff_seconds` (Number) The number of seconds to apply as a linear back off between download attempts.
- `feed_type` (String)
- `feed_uri` (String)
- `feed_type` (String) A filter to search by feed type. Valid feed types are `AwsElasticContainerRegistry`, `BuiltIn`, `Docker`, `GitHub`, `Helm`, `Maven`, `NuGet`, or `OctopusProject`.
- `id` (String) The unique ID for this resource.
- `is_enhanced_mode` (Boolean)
- `name` (String) A short, memorable, unique name for this feed. Example: ACME Builds.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `region` (String)
- `registry_path` (String)
- `secret_key` (String, Sensitive)
- `space_id` (String) The space ID associated with this resource.
- `username` (String, Sensitive) The username associated with this resource.
- `space_id` (String) The space ID associated with this feeds.
- `username` (String, Sensitive) The username associated with this resource.

Read-Only:

- `region` (String)
4 changes: 2 additions & 2 deletions docs/data-sources/library_variable_sets.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "octopusdeploy_library_variable_sets Data Source - terraform-provider-octopusdeploy"
subcategory: ""
description: |-
Provides information about existing library variable sets.
---

# octopusdeploy_library_variable_sets (Data Source)


Provides information about existing library variable sets.



Expand Down
4 changes: 2 additions & 2 deletions docs/resources/artifactory_generic_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "octopusdeploy_artifactory_generic_feed" "example" {
### Required

- `feed_uri` (String)
- `name` (String) A short, memorable, unique name for this feed. Example: ACME Builds.
- `name` (String) The name of this resource.
- `repository` (String)

### Optional
Expand All @@ -38,7 +38,7 @@ resource "octopusdeploy_artifactory_generic_feed" "example" {
- `layout_regex` (String)
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this resource.
- `space_id` (String) The space ID associated with this helm feed.
- `username` (String, Sensitive) The username associated with this resource.

## Import
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/aws_elastic_container_registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ resource "octopusdeploy_aws_elastic_container_registry" "example" {
### Required

- `access_key` (String) The AWS access key to use when authenticating against Amazon Web Services.
- `name` (String) A short, memorable, unique name for this feed. Example: ACME Builds.
- `name` (String) The name of this resource.
- `region` (String) The AWS region where the registry resides.
- `secret_key` (String, Sensitive) The AWS secret key to use when authenticating against Amazon Web Services.

### Optional

- `id` (String) The unique ID for this feed.
- `id` (String) The unique ID for this resource.
- `package_acquisition_location_options` (List of String)
- `space_id` (String) The space ID associated with this feed.
- `space_id` (String) The space ID associated with this aws elastic container registry.

## Import

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/docker_container_registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ resource "octopusdeploy_docker_container_registry" "example" {

### Required

- `feed_uri` (String) The URL to a Docker repository.
- `name` (String) A short, memorable, unique name for this feed. Example: ACME Builds.
- `feed_uri` (String)
- `name` (String) The name of this resource.

### Optional

Expand All @@ -35,7 +35,7 @@ resource "octopusdeploy_docker_container_registry" "example" {
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `registry_path` (String)
- `space_id` (String) The space ID associated with this resource.
- `space_id` (String) The space ID associated with this docker container registry feed.
- `username` (String, Sensitive) The username associated with this resource.

## Import
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/github_repository_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resource "octopusdeploy_github_repository_feed" "example" {
### Required

- `feed_uri` (String)
- `name` (String) A short, memorable, unique name for this feed. Example: ACME Builds.
- `name` (String) The name of this resource.

### Optional

Expand All @@ -36,7 +36,7 @@ resource "octopusdeploy_github_repository_feed" "example" {
- `id` (String) The unique ID for this resource.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this resource.
- `space_id` (String) The space ID associated with this github repository feed.
- `username` (String, Sensitive) The username associated with this resource.

## Import
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/helm_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
page_title: "octopusdeploy_helm_feed Resource - terraform-provider-octopusdeploy"
subcategory: "Feeds"
description: |-
This resource manages a Helm feed in Octopus Deploy.
This resource manages a Helm Feed in Octopus Deploy.
---

# octopusdeploy_helm_feed (Resource)

This resource manages a Helm feed in Octopus Deploy.
This resource manages a Helm Feed in Octopus Deploy.

## Example Usage

Expand All @@ -25,14 +25,14 @@ resource "octopusdeploy_helm_feed" "example" {
### Required

- `feed_uri` (String)
- `name` (String) A short, memorable, unique name for this feed. Example: ACME Builds.
- `name` (String) The name of this resource.

### Optional

- `id` (String) The unique ID for this resource.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this resource.
- `space_id` (String) The space ID associated with this helm feed.
- `username` (String, Sensitive) The username associated with this resource.

## Import
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/library_variable_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "octopusdeploy_library_variable_set Resource - terraform-provider-octopusdeploy"
subcategory: ""
description: |-
This resource manages library variable sets in Octopus Deploy.
---

# octopusdeploy_library_variable_set (Resource)


This resource manages library variable sets in Octopus Deploy.



Expand Down
4 changes: 2 additions & 2 deletions docs/resources/maven_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resource "octopusdeploy_maven_feed" "example" {
### Required

- `feed_uri` (String)
- `name` (String) A short, memorable, unique name for this feed. Example: ACME Builds.
- `name` (String) The name of this resource.

### Optional

Expand All @@ -36,7 +36,7 @@ resource "octopusdeploy_maven_feed" "example" {
- `id` (String) The unique ID for this resource.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this resource.
- `space_id` (String) The space ID associated with this maven feed.
- `username` (String, Sensitive) The username associated with this resource.

## Import
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/nuget_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ resource "octopusdeploy_nuget_feed" "example" {

### Required

- `feed_uri` (String) The feed URI can be a URL or a folder path.
- `name` (String) A short, memorable, unique name for this feed. Example: ACME Builds.
- `feed_uri` (String)
- `name` (String) The name of this resource.

### Optional

Expand All @@ -38,7 +38,7 @@ resource "octopusdeploy_nuget_feed" "example" {
- `is_enhanced_mode` (Boolean) This will improve performance of the NuGet feed but may not be supported by some older feeds. Disable if the operation, Create Release does not return the latest version for a package.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this resource.
- `space_id` (String) The space ID associated with this nuget feed.
- `username` (String, Sensitive) The username associated with this resource.

## Import
Expand Down
5 changes: 4 additions & 1 deletion octopusdeploy/data_source_tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ func dataSourceTenantsRead(ctx context.Context, d *schema.ResourceData, meta int
flattenedTenants = append(flattenedTenants, flattenTenant(tenant))
}

d.Set("tenants", flattenedTenants)
if err := d.Set("tenants", flattenedTenants); err != nil {
return diag.FromErr(err)
}

d.SetId("Tenants " + time.Now().UTC().String())

return nil
Expand Down
1 change: 0 additions & 1 deletion octopusdeploy/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ func Provider() *schema.Provider {
"octopusdeploy_channel": resourceChannel(),
"octopusdeploy_cloud_region_deployment_target": resourceCloudRegionDeploymentTarget(),
"octopusdeploy_deployment_process": resourceDeploymentProcess(),
"octopusdeploy_docker_container_registry": resourceDockerContainerRegistry(),
"octopusdeploy_dynamic_worker_pool": resourceDynamicWorkerPool(),
"octopusdeploy_gcp_account": resourceGoogleCloudPlatformAccount(),
"octopusdeploy_kubernetes_agent_deployment_target": resourceKubernetesAgentDeploymentTarget(),
Expand Down
104 changes: 0 additions & 104 deletions octopusdeploy/resource_docker_container_registry.go

This file was deleted.

1 change: 1 addition & 0 deletions octopusdeploy/schema_account_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func getAccountResourceDataSchema() map[string]*schema.Schema {
Description: "A list of accounts that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Type: schema.TypeList,
Optional: false,
},
"id": getDataSchemaID(),
"space_id": getQuerySpaceID(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func getAzureCloudServiceDeploymentTargetDataSchema() map[string]*schema.Schema
Computed: true,
Description: "A list of Azure cloud service deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func getAzureServiceFabricClusterDeploymentTargetDataSchema() map[string]*schema
Computed: true,
Description: "A list of Azure service fabric cluster deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_azure_web_app_deployment_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func getAzureWebAppDeploymentTargetDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of Azure web app deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
Loading

0 comments on commit c461ca0

Please sign in to comment.