atlassian / terraform-provider-artifactory

Terraform provider to manage Artifactory
Apache License 2.0
89 stars 42 forks source link

Need ability to create Smart Remote Repository by supporting 'contentSynchronisation' argument #76

Closed AshutoshNirkhe closed 4 years ago

AshutoshNirkhe commented 4 years ago

Community Note

Description

Currently terraform-provider-artifactory v2.0.0-alpha1 doesn't support an argument called 'contentSynchronisation' that is necessary for creating a 'Smart Remote Repository' in JFrog Artifactory (It's a must for Artifactory Edge license).
Ref : REST API section at the bottom of link - https://www.jfrog.com/confluence/display/JFROG/Smart+Remote+Repositories

Because of this we are getting below error in terraform apply - Status:400 Message:Only smart remote repositories are supported with Artifactory Edge license

It will be great if you could add this support as this is available via JFrog REST API!

New or Affected Resource(s)

Potential Terraform Configuration

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.
resource "artifactory_remote_repository" "smart-remote-repo" {
  key             = "my-smart-remote-repo"
  package_type    = "generic"
  url             = "https://my-jfrog.org/artifactory/generic-local-repo"
  repo_layout_ref = "simple-default"   
  content_synchronisation = {
    enabled = true,
    statistics = {
      enabled = true
    },
    properties = {
      enabled = false
    },
    source = {
      originAbsenceDetection = false
    }
  }
}

References

https://www.jfrog.com/confluence/display/JFROG/Smart+Remote+Repositories

AshutoshNirkhe commented 4 years ago

I have raised the PR for this issue here, please review - https://github.com/atlassian/terraform-provider-artifactory/pull/77/files

djsly commented 4 years ago

This can be closed I think

AshutoshNirkhe commented 4 years ago

Closing, as the PR is merged and we are able to create remote repos after that.