diff --git a/argocd/schema_repository.go b/argocd/schema_repository.go index d6dc02bd..e1c2b024 100644 --- a/argocd/schema_repository.go +++ b/argocd/schema_repository.go @@ -64,6 +64,11 @@ func repositorySchema() map[string]*schema.Schema { // TODO: add a validator Optional: true, }, + "enable_oci": { + Type: schema.TypeBool, + Description: "Specify whether the repo server should be viewed as OCI compliant", + Optional: true, + }, "type": { Type: schema.TypeString, Description: "type of the repo, may be 'git' or 'helm', defaults to 'git'", diff --git a/argocd/schema_repository_credentials.go b/argocd/schema_repository_credentials.go index ad6d8686..e2010ced 100644 --- a/argocd/schema_repository_credentials.go +++ b/argocd/schema_repository_credentials.go @@ -42,5 +42,10 @@ func repositoryCredentialsSchema() map[string]*schema.Schema { // TODO: add a validator Optional: true, }, + "enable_oci": { + Type: schema.TypeBool, + Description: "Specify whether the repo server should be viewed as OCI compliant", + Optional: true, + }, } } diff --git a/argocd/structure_repository.go b/argocd/structure_repository.go index 0aa2eab7..f611cb3c 100644 --- a/argocd/structure_repository.go +++ b/argocd/structure_repository.go @@ -40,6 +40,9 @@ func expandRepository(d *schema.ResourceData) *application.Repository { if v, ok := d.GetOk("tls_client_cert_key"); ok { repository.TLSClientCertKey = v.(string) } + if v, ok := d.GetOk("enable_oci"); ok { + repository.EnableOCI = v.(bool) + } if v, ok := d.GetOk("type"); ok { repository.Type = v.(string) } diff --git a/argocd/structure_repository_credentials.go b/argocd/structure_repository_credentials.go index a4c336e0..47768a08 100644 --- a/argocd/structure_repository_credentials.go +++ b/argocd/structure_repository_credentials.go @@ -31,6 +31,9 @@ func expandRepositoryCredentials(d *schema.ResourceData) *application.RepoCreds if v, ok := d.GetOk("tls_client_cert_key"); ok { repoCreds.TLSClientCertKey = v.(string) } + if v, ok := d.GetOk("enable_oci"); ok { + repoCreds.EnableOCI = v.(bool) + } return repoCreds } diff --git a/docs/resources/repository.md b/docs/resources/repository.md index e98f2b9e..96af3315 100644 --- a/docs/resources/repository.md +++ b/docs/resources/repository.md @@ -38,6 +38,7 @@ resource "argocd_repository" "private" { * `ssh_private_key` - (Optional), string, SSH private key data to authenticate against the repository server. **Only for Git repositories**. * `tls_client_cert_data` - (Optional), TLS client cert data to authenticate against the repository server. * `tls_client_cert_key` - (Optional), TLS client cert key to authenticate against the repository server. +* `enable_oci` - (Optional), specify whether the repository server should be viewed as OCI compliant. # Exported Attributes diff --git a/docs/resources/repository_credentials.md b/docs/resources/repository_credentials.md index 78797c95..1072630d 100644 --- a/docs/resources/repository_credentials.md +++ b/docs/resources/repository_credentials.md @@ -26,6 +26,7 @@ resource "argocd_repository" "private" { * `ssh_private_key` - (Optional), string, SSH private key data to authenticate against the repository server. **Only for Git repositories**. * `tls_client_cert_data` - (Optional), TLS client cert data to authenticate against the repository server. * `tls_client_cert_key` - (Optional), TLS client cert key to authenticate against the repository server. +* `enable_oci` - (Optional), specify whether the repository server should be viewed as OCI compliant. ## Import