forked from jfrog/terraform-provider-artifactory
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'jfrogGH-621-bulk-import' of github.com:chb0github/terra…
…form-provider-artifactory into jfrogGH-621-bulk-import * 'jfrogGH-621-bulk-import' of github.com:chb0github/terraform-provider-artifactory: fix store_artifacts_locally docs to reflect reality JFrog Pipelines - Add Artifactory version to CHANGELOG.md Update CHANGELOG Update module path from 'v8' to 'v9' Add planmodifier.RequiresReplace() to "key" attribute Update CHANGELOG Migrate 'artifactory_backup' resource to terraform-plugin-framework Update CHANGELOG Update validation for "project_environments" to allow empty list Update documentation JFrog Pipelines - Add Artifactory version to CHANGELOG.md Update CHANGELOG Add "force_conan_authentication" attribute to local, virtual, and federated repo resources and data sources
- Loading branch information
Showing
175 changed files
with
1,321 additions
and
584 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...tory/datasource/repository/federated/datasource_artifactory_federated_conan_repository.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package federated | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" | ||
"github.com/jfrog/terraform-provider-artifactory/v9/pkg/artifactory/datasource/repository" | ||
resource_repository "github.com/jfrog/terraform-provider-artifactory/v9/pkg/artifactory/resource/repository" | ||
"github.com/jfrog/terraform-provider-artifactory/v9/pkg/artifactory/resource/repository/federated" | ||
"github.com/jfrog/terraform-provider-artifactory/v9/pkg/artifactory/resource/repository/local" | ||
"github.com/jfrog/terraform-provider-shared/packer" | ||
"github.com/jfrog/terraform-provider-shared/predicate" | ||
utilsdk "github.com/jfrog/terraform-provider-shared/util/sdk" | ||
) | ||
|
||
func DataSourceArtifactoryFederatedConanRepository() *schema.Resource { | ||
conanSchema := utilsdk.MergeMaps( | ||
local.ConanSchema, | ||
memberSchema, | ||
resource_repository.RepoLayoutRefSchema(rclass, resource_repository.ConanPackageType), | ||
) | ||
|
||
var packConanMembers = func(repo interface{}, d *schema.ResourceData) error { | ||
members := repo.(*federated.ConanRepositoryParams).Members | ||
return federated.PackMembers(members, d) | ||
} | ||
|
||
pkr := packer.Compose( | ||
packer.Universal( | ||
predicate.All( | ||
predicate.NoClass, | ||
predicate.Ignore("member", "terraform_type", "enable_conan_support"), | ||
), | ||
), | ||
packConanMembers, | ||
) | ||
|
||
constructor := func() (interface{}, error) { | ||
return &federated.ConanRepositoryParams{ | ||
ConanRepoParams: local.ConanRepoParams{ | ||
RepositoryBaseParams: local.RepositoryBaseParams{ | ||
PackageType: resource_repository.ConanPackageType, | ||
Rclass: rclass, | ||
}, | ||
}, | ||
}, nil | ||
} | ||
|
||
return &schema.Resource{ | ||
Schema: conanSchema, | ||
ReadContext: repository.MkRepoReadDataSource(pkr, constructor), | ||
Description: "Provides a data source for a federated Conan repository", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.