Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .changelog/14776.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
```release-note:enhancement
artifactregistry: added `registry_uri` as attribute to `google_artifact_registry_repository`
```

**Tests:**

```
make testacc TEST=./google/services/artifactregistry TESTARGS='-run=TestAccArtifactRegistryRepository_update'

.TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/artifactregistry -v -run=TestAccArtifactRegistryRepository_update -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"

=== RUN TestAccArtifactRegistryRepository_update
=== PAUSE TestAccArtifactRegistryRepository_update
=== RUN TestAccArtifactRegistryRepository_updateEmptyMvn
=== PAUSE TestAccArtifactRegistryRepository_updateEmptyMvn
=== CONT TestAccArtifactRegistryRepository_update
=== CONT TestAccArtifactRegistryRepository_updateEmptyMvn
--- PASS: TestAccArtifactRegistryRepository_update (16.29s)
--- PASS: TestAccArtifactRegistryRepository_updateEmptyMvn (25.40s)
PASS
ok github.com/hashicorp/terraform-provider-google/google/services/artifactregistry 26.147s
```
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,11 @@ Repository. Upstream policies cannot be set on a standard repository.`,
Description: `The name of the repository, for example:
"repo1"`,
},
"registry_uri": {
Type: schema.TypeString,
Computed: true,
Description: `The repository endpoint, for example: us-docker.pkg.dev/my-proj/my-repo.`,
},
"terraform_labels": {
Type: schema.TypeMap,
Computed: true,
Expand Down Expand Up @@ -1023,6 +1028,9 @@ func resourceArtifactRegistryRepositoryRead(d *schema.ResourceData, meta interfa
if err := d.Set("labels", flattenArtifactRegistryRepositoryLabels(res["labels"], d, config)); err != nil {
return fmt.Errorf("Error reading Repository: %s", err)
}
if err := d.Set("registry_uri", flattenArtifactRegistryRepositoryRegistryUri(res["registryUri"], d, config)); err != nil {
return fmt.Errorf("Error reading Repository: %s", err)
}
if err := d.Set("kms_key_name", flattenArtifactRegistryRepositoryKmsKeyName(res["kmsKeyName"], d, config)); err != nil {
return fmt.Errorf("Error reading Repository: %s", err)
}
Expand Down Expand Up @@ -1318,6 +1326,10 @@ func flattenArtifactRegistryRepositoryLabels(v interface{}, d *schema.ResourceDa
return transformed
}

func flattenArtifactRegistryRepositoryRegistryUri(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}

func flattenArtifactRegistryRepositoryKmsKeyName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fields:
- field: 'maven_config.version_policy'
- field: 'mode'
- field: 'name'
- field: 'registry_uri'
- field: 'remote_repository_config.apt_repository.public_repository.repository_base'
- field: 'remote_repository_config.apt_repository.public_repository.repository_path'
- field: 'remote_repository_config.common_repository.uri'
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/artifact_registry_repository.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,9 @@ In addition to the arguments listed above, the following computed attributes are
The name of the repository, for example:
"repo1"

* `registry_uri` -
The repository endpoint, for example: us-docker.pkg.dev/my-proj/my-repo.

* `create_time` -
The time when the repository was created.

Expand Down
Loading