Skip to content

Commit

Permalink
noissue: Remove default values. Rely on Artifactory defaults. Bump ve…
Browse files Browse the repository at this point in the history
…rsions
  • Loading branch information
Dillon Giacoppo committed May 19, 2019
1 parent 9aa76dd commit b71611d
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 64 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Fetch the dependencies
FROM golang:1.11-alpine AS builder
FROM golang:1.12-alpine AS builder

RUN apk add --update ca-certificates git gcc g++ libc-dev
WORKDIR /src/
Expand All @@ -18,6 +18,6 @@ RUN CGO_ENABLED=0 GOOS=linux go build


# Build the final image
FROM hashicorp/terraform:0.11.13
FROM hashicorp/terraform:0.11.14

COPY --from=builder /src/terraform-provider-artifactory /root/.terraform.d/plugins/
5 changes: 1 addition & 4 deletions pkg/artifactory/resource_artifactory_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"

"github.com/atlassian/go-artifactory/v2/artifactory"
v1 "github.com/atlassian/go-artifactory/v2/artifactory/v1"
"github.com/atlassian/go-artifactory/v2/artifactory/v1"
"github.com/hashicorp/terraform/helper/schema"
)

Expand Down Expand Up @@ -35,17 +35,14 @@ func resourceArtifactoryGroup() *schema.Resource {
"auto_join": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"admin_privileges": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"realm": {
Type: schema.TypeString,
Optional: true,
Default: "internal",
ValidateFunc: validateLowerCase,
},
"realm_attributes": {
Expand Down
14 changes: 0 additions & 14 deletions pkg/artifactory/resource_artifactory_local_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func resourceArtifactoryLocalRepository() *schema.Resource {
"package_type": {
Type: schema.TypeString,
Optional: true,
Default: "generic",
ForceNew: true,
},
"description": {
Expand All @@ -44,12 +43,10 @@ func resourceArtifactoryLocalRepository() *schema.Resource {
"includes_pattern": {
Type: schema.TypeString,
Optional: true,
Default: "**/*",
},
"excludes_pattern": {
Type: schema.TypeString,
Optional: true,
Default: "",
},
"repo_layout_ref": {
Type: schema.TypeString,
Expand All @@ -59,17 +56,14 @@ func resourceArtifactoryLocalRepository() *schema.Resource {
"handle_releases": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"handle_snapshots": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"max_unique_snapshots": {
Type: schema.TypeInt,
Optional: true,
Default: 0,
},
"debian_trivial_layout": {
Type: schema.TypeBool,
Expand All @@ -78,27 +72,22 @@ func resourceArtifactoryLocalRepository() *schema.Resource {
"checksum_policy_type": {
Type: schema.TypeString,
Optional: true,
Default: "client-checksums",
},
"max_unique_tags": {
Type: schema.TypeInt,
Optional: true,
Default: 0,
},
"snapshot_version_behavior": {
Type: schema.TypeString,
Optional: true,
Default: "non-unique",
},
"suppress_pom_consistency_checks": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"blacked_out": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"property_sets": {
Type: schema.TypeSet,
Expand All @@ -121,17 +110,14 @@ func resourceArtifactoryLocalRepository() *schema.Resource {
"docker_api_version": {
Type: schema.TypeString,
Optional: true,
Default: "V2",
},
"enable_file_lists_indexing": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"xray_index": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
},
}
Expand Down
34 changes: 1 addition & 33 deletions pkg/artifactory/resource_artifactory_remote_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"

"github.com/atlassian/go-artifactory/v2/artifactory"
v1 "github.com/atlassian/go-artifactory/v2/artifactory/v1"
"github.com/atlassian/go-artifactory/v2/artifactory/v1"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
)
Expand All @@ -32,7 +32,6 @@ func resourceArtifactoryRemoteRepository() *schema.Resource {
"package_type": {
Type: schema.TypeString,
Optional: true,
Default: "generic",
ForceNew: true,
},
"description": {
Expand All @@ -49,12 +48,10 @@ func resourceArtifactoryRemoteRepository() *schema.Resource {
"includes_pattern": {
Type: schema.TypeString,
Optional: true,
Default: "**/*",
},
"excludes_pattern": {
Type: schema.TypeString,
Optional: true,
Default: "",
},
"repo_layout_ref": {
Type: schema.TypeString,
Expand All @@ -63,22 +60,18 @@ func resourceArtifactoryRemoteRepository() *schema.Resource {
"handle_releases": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"handle_snapshots": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"max_unique_snapshots": {
Type: schema.TypeInt,
Optional: true,
Default: 0,
},
"suppress_pom_consistency_checks": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"url": {
Type: schema.TypeString,
Expand All @@ -101,7 +94,6 @@ func resourceArtifactoryRemoteRepository() *schema.Resource {
"remote_repo_checksum_policy_type": {
Type: schema.TypeString,
Optional: true,
Default: "generate-if-absent",
ValidateFunc: validation.StringInSlice([]string{
"generate-if-absent",
"fail",
Expand All @@ -112,27 +104,22 @@ func resourceArtifactoryRemoteRepository() *schema.Resource {
"hard_fail": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"offline": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"blacked_out": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"store_artifacts_locally": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"socket_timeout_millis": {
Type: schema.TypeInt,
Optional: true,
Default: 15000,
},
"local_address": {
Type: schema.TypeString,
Expand All @@ -141,42 +128,34 @@ func resourceArtifactoryRemoteRepository() *schema.Resource {
"retrieval_cache_period_seconds": {
Type: schema.TypeInt,
Optional: true,
Default: 43200,
},
"missed_cache_period_seconds": {
Type: schema.TypeInt,
Optional: true,
Default: 7200,
},
"unused_artifacts_cleanup_period_hours": {
Type: schema.TypeInt,
Optional: true,
Default: 0,
},
"fetch_jars_eagerly": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"fetch_sources_eagerly": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"share_configuration": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"synchronize_properties": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"block_mismatching_mime_types": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"property_sets": {
Type: schema.TypeSet,
Expand All @@ -187,57 +166,46 @@ func resourceArtifactoryRemoteRepository() *schema.Resource {
"allow_any_host_auth": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"enable_cookie_management": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"client_tls_certificate": {
Type: schema.TypeString,
Optional: true,
Default: "",
},
"pypi_registry_url": {
Type: schema.TypeString,
Optional: true,
Default: "",
},
"bower_registry_url": {
Type: schema.TypeString,
Optional: true,
Default: "",
},
"bypass_head_requests": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"enable_token_authentication": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"xray_index": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"vcs_type": {
Type: schema.TypeString,
Optional: true,
Default: "",
},
"vcs_git_provider": {
Type: schema.TypeString,
Optional: true,
Default: "",
},
"vcs_git_download_url": {
Type: schema.TypeString,
Optional: true,
Default: "",
},
"feed_context_path": {
Type: schema.TypeString,
Expand Down
6 changes: 0 additions & 6 deletions pkg/artifactory/resource_artifactory_replication_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func resourceArtifactoryReplicationConfig() *schema.Resource {
"enable_event_replication": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"replications": {
Type: schema.TypeList,
Expand All @@ -49,7 +48,6 @@ func resourceArtifactoryReplicationConfig() *schema.Resource {
"socket_timeout_millis": {
Type: schema.TypeInt,
Optional: true,
Default: 15000,
},
"username": {
Type: schema.TypeString,
Expand All @@ -64,22 +62,18 @@ func resourceArtifactoryReplicationConfig() *schema.Resource {
"enabled": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"sync_deletes": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"sync_properties": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"sync_statistics": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"path_prefix": {
Type: schema.TypeString,
Expand Down
4 changes: 0 additions & 4 deletions pkg/artifactory/resource_artifactory_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,18 @@ func resourceArtifactoryUser() *schema.Resource {
"admin": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"profile_updatable": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"disable_ui_access": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"internal_password_disabled": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"groups": {
Type: schema.TypeSet,
Expand Down
1 change: 0 additions & 1 deletion pkg/artifactory/resource_artifactory_virtual_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func resourceArtifactoryVirtualRepository() *schema.Resource {
"pom_repository_references_cleanup_policy": {
Type: schema.TypeString,
Optional: true,
Default: "discard_active_reference",
},
"default_deployment_repo": {
Type: schema.TypeString,
Expand Down

0 comments on commit b71611d

Please sign in to comment.