diff --git a/README.md b/README.md index 825ddf82b..d36430db4 100644 --- a/README.md +++ b/README.md @@ -373,6 +373,7 @@ The following resources are available in the InSpec GCP Profile | [google_vertex_ai_tensorboard_experiment_run](docs/resources/google_vertex_ai_tensorboard_experiment_run.md) | [google_vertex_ai_tensorboard_experiment_runs](docs/resources/google_vertex_ai_tensorboard_experiment_runs.md) | | [google_vertex_ai_tensorboard_experiment_run_time_series_resource](docs/resources/google_vertex_ai_tensorboard_experiment_run_time_series_resource.md) | [google_vertex_ai_tensorboard_experiment_run_time_series_resources](docs/resources/google_vertex_ai_tensorboard_experiment_run_time_series_resources.md) | | [google_vertex_ai_training_pipeline](docs/resources/google_vertex_ai_training_pipeline.md) | [google_vertex_ai_training_pipelines](docs/resources/google_vertex_ai_training_pipelines.md) | +| [google_artifactregistry_project_location_repository](docs/resources/google_artifactregistry_project_location_repository.md) | [google_artifactregistry_project_location_repositories](docs/resources/google_artifactregistry_project_location_repositories.md) | | [google_composer_project_location_environment](docs/resources/google_composer_project_location_environment.md) | [google_composer_project_location_environments](docs/resources/google_composer_project_location_environment.md) | ## Examples diff --git a/docs/resources/google_artifactregistry_project_location_repositories.md b/docs/resources/google_artifactregistry_project_location_repositories.md new file mode 100644 index 000000000..43d89c0e2 --- /dev/null +++ b/docs/resources/google_artifactregistry_project_location_repositories.md @@ -0,0 +1,43 @@ +--- +title: About the google_artifactregistry_project_location_repositories resource +platform: gcp +--- + +## Syntax +A `google_artifactregistry_project_location_repositories` is used to test a Google ProjectLocationRepository resource + +## Examples +``` + describe google_artifactregistry_project_location_repositories(parent: ' value_parent') do + it { should exist } + end +``` + +## Properties +Properties that can be accessed from the `google_artifactregistry_project_location_repositories` resource: + +See [google_artifactregistry_project_location_repository.md](google_artifactregistry_project_location_repository.md) for more detailed information + * `maven_configs`: an array of `google_artifactregistry_project_location_repository` maven_config + * `docker_configs`: an array of `google_artifactregistry_project_location_repository` docker_config + * `virtual_repository_configs`: an array of `google_artifactregistry_project_location_repository` virtual_repository_config + * `remote_repository_configs`: an array of `google_artifactregistry_project_location_repository` remote_repository_config + * `names`: an array of `google_artifactregistry_project_location_repository` name + * `formats`: an array of `google_artifactregistry_project_location_repository` format + * `descriptions`: an array of `google_artifactregistry_project_location_repository` description + * `labels`: an array of `google_artifactregistry_project_location_repository` labels + * `create_times`: an array of `google_artifactregistry_project_location_repository` create_time + * `update_times`: an array of `google_artifactregistry_project_location_repository` update_time + * `kms_key_names`: an array of `google_artifactregistry_project_location_repository` kms_key_name + * `modes`: an array of `google_artifactregistry_project_location_repository` mode + * `cleanup_policies`: an array of `google_artifactregistry_project_location_repository` cleanup_policies + * `size_bytes`: an array of `google_artifactregistry_project_location_repository` size_bytes + * `satisfies_pzs`: an array of `google_artifactregistry_project_location_repository` satisfies_pzs + * `cleanup_policy_dry_runs`: an array of `google_artifactregistry_project_location_repository` cleanup_policy_dry_run + +## Filter Criteria +This resource supports all of the above properties as filter criteria, which can be used +with `where` as a block or a method. + +## GCP Permissions + +Ensure the [Artifact Registry API](https://console.cloud.google.com/apis/library/artifactregistry.googleapis.com/) is enabled for the current project. diff --git a/docs/resources/google_artifactregistry_project_location_repository.md b/docs/resources/google_artifactregistry_project_location_repository.md new file mode 100644 index 000000000..c0165c04c --- /dev/null +++ b/docs/resources/google_artifactregistry_project_location_repository.md @@ -0,0 +1,165 @@ +--- +title: About the google_artifactregistry_project_location_repository resource +platform: gcp +--- + +## Syntax +A `google_artifactregistry_project_location_repository` is used to test a Google ProjectLocationRepository resource + +## Examples +``` +describe google_artifactregistry_project_location_repository(name: ' value_name') do + it { should exist } + +end + +describe google_artifactregistry_project_location_repository(name: "does_not_exit") do + it { should_not exist } +end +``` + +## Properties +Properties that can be accessed from the `google_artifactregistry_project_location_repository` resource: + + + * `maven_config`: MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. + + * `allow_snapshot_overwrites`: The repository with this flag will allow publishing the same snapshot versions. + + * `version_policy`: Version policy defines the versions that the registry will accept. + Possible values: + * VERSION_POLICY_UNSPECIFIED + * RELEASE + * SNAPSHOT + + * `docker_config`: DockerRepositoryConfig is docker related repository details. Provides additional configuration details for repositories of the docker format type. + + * `immutable_tags`: The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created. + + * `virtual_repository_config`: Virtual repository configuration. + + * `upstream_policies`: Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository. + + * `id`: The user-provided ID of the upstream policy. + + * `repository`: A reference to the repository resource, for example: `projects/p1/locations/us-central1/repositories/repo1`. + + * `priority`: Entries with a greater priority value take precedence in the pull order. + + * `remote_repository_config`: Remote repository configuration. + + * `docker_repository`: Configuration for a Docker remote repository. + + * `public_repository`: One of the publicly available Docker repositories supported by Artifact Registry. + Possible values: + * PUBLIC_REPOSITORY_UNSPECIFIED + * DOCKER_HUB + + * `maven_repository`: Configuration for a Maven remote repository. + + * `public_repository`: One of the publicly available Maven repositories supported by Artifact Registry. + Possible values: + * PUBLIC_REPOSITORY_UNSPECIFIED + * MAVEN_CENTRAL + + * `npm_repository`: Configuration for a Npm remote repository. + + * `public_repository`: One of the publicly available Npm repositories supported by Artifact Registry. + Possible values: + * PUBLIC_REPOSITORY_UNSPECIFIED + * NPMJS + + * `python_repository`: Configuration for a Python remote repository. + + * `public_repository`: One of the publicly available Python repositories supported by Artifact Registry. + Possible values: + * PUBLIC_REPOSITORY_UNSPECIFIED + * PYPI + + * `apt_repository`: Configuration for an Apt remote repository. + + * `public_repository`: Publicly available Apt repositories constructed from a common repository base and a custom repository path. + + * `repository_base`: A common public repository base for Apt. + Possible values: + * REPOSITORY_BASE_UNSPECIFIED + * DEBIAN + * UBUNTU + * DEBIAN_SNAPSHOT + + * `repository_path`: A custom field to define a path to a specific repository from the base. + + * `yum_repository`: Configuration for a Yum remote repository. + + * `public_repository`: Publicly available Yum repositories constructed from a common repository base and a custom repository path. + + * `repository_base`: A common public repository base for Yum. + Possible values: + * REPOSITORY_BASE_UNSPECIFIED + * CENTOS + * CENTOS_DEBUG + * CENTOS_VAULT + * CENTOS_STREAM + * ROCKY + * EPEL + + * `repository_path`: A custom field to define a path to a specific repository from the base. + + * `description`: The description of the remote source. + + * `upstream_credentials`: The credentials to access the remote repository. + + * `username_password_credentials`: Username and password credentials. + + * `username`: The username to access the remote repository. + + * `password_secret_version`: The Secret Manager key version that holds the password to access the remote repository. Must be in the format of `projects/{project}/secrets/{secret}/versions/{version}`. + + * `name`: The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. + + * `format`: Optional. The format of packages that are stored in the repository. + Possible values: + * FORMAT_UNSPECIFIED + * DOCKER + * MAVEN + * NPM + * APT + * YUM + * GOOGET + * PYTHON + * KFP + * GO + + * `description`: The user-provided description of the repository. + + * `labels`: Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes. + + * `additional_properties`: + + * `create_time`: Output only. The time when the repository was created. + + * `update_time`: Output only. The time when the repository was last updated. + + * `kms_key_name`: The Cloud KMS resource name of the customer managed encryption key that's used to encrypt the contents of the Repository. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. This value may not be changed after the Repository has been created. + + * `mode`: Optional. The mode of the repository. + Possible values: + * MODE_UNSPECIFIED + * STANDARD_REPOSITORY + * VIRTUAL_REPOSITORY + * REMOTE_REPOSITORY + + * `cleanup_policies`: Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. + + * `additional_properties`: Artifact policy configuration for repository cleanup policies. + + * `size_bytes`: Output only. The size, in bytes, of all artifact storage in this repository. Repositories that are generally available or in public preview use this to calculate storage costs. + + * `satisfies_pzs`: Output only. If set, the repository satisfies physical zone separation. + + * `cleanup_policy_dry_run`: Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. + + +## GCP Permissions + +Ensure the [Artifact Registry API](https://console.cloud.google.com/apis/library/artifactregistry.googleapis.com/) is enabled for the current project. diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_cleanup_policies.rb b/libraries/google/artifactregistry/property/projectlocationrepository_cleanup_policies.rb new file mode 100644 index 000000000..5da86b6f9 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_cleanup_policies.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryCleanupPolicies + attr_reader :additional_properties + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @additional_properties = args['additionalProperties'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryCleanupPolicies" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_docker_config.rb b/libraries/google/artifactregistry/property/projectlocationrepository_docker_config.rb new file mode 100644 index 000000000..4786b0060 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_docker_config.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryDockerConfig + attr_reader :immutable_tags + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @immutable_tags = args['immutableTags'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryDockerConfig" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_labels.rb b/libraries/google/artifactregistry/property/projectlocationrepository_labels.rb new file mode 100644 index 000000000..4aa2864e0 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_labels.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryLabels + attr_reader :additional_properties + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @additional_properties = args['additionalProperties'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryLabels" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_maven_config.rb b/libraries/google/artifactregistry/property/projectlocationrepository_maven_config.rb new file mode 100644 index 000000000..4044b6e84 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_maven_config.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryMavenConfig + attr_reader :allow_snapshot_overwrites + + attr_reader :version_policy + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @allow_snapshot_overwrites = args['allowSnapshotOverwrites'] + @version_policy = args['versionPolicy'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryMavenConfig" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config.rb new file mode 100644 index 000000000..e71850413 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository' +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfig + attr_reader :docker_repository + + attr_reader :maven_repository + + attr_reader :npm_repository + + attr_reader :python_repository + + attr_reader :apt_repository + + attr_reader :yum_repository + + attr_reader :description + + attr_reader :upstream_credentials + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @docker_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigDockerRepository.new(args['dockerRepository'], to_s) + @maven_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigMavenRepository.new(args['mavenRepository'], to_s) + @npm_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigNpmRepository.new(args['npmRepository'], to_s) + @python_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigPythonRepository.new(args['pythonRepository'], to_s) + @apt_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigAptRepository.new(args['aptRepository'], to_s) + @yum_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigYumRepository.new(args['yumRepository'], to_s) + @description = args['description'] + @upstream_credentials = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentials.new(args['upstreamCredentials'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfig" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository.rb new file mode 100644 index 000000000..7ec93c9e8 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository' +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigAptRepository + attr_reader :public_repository + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @public_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigAptRepositoryPublicRepository.new(args['publicRepository'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigAptRepository" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository.rb new file mode 100644 index 000000000..ada74e082 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigAptRepositoryPublicRepository + attr_reader :repository_base + + attr_reader :repository_path + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @repository_base = args['repositoryBase'] + @repository_path = args['repositoryPath'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigAptRepositoryPublicRepository" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository.rb new file mode 100644 index 000000000..b2b1b71e2 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigDockerRepository + attr_reader :public_repository + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @public_repository = args['publicRepository'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigDockerRepository" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository.rb new file mode 100644 index 000000000..6164f71ae --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigMavenRepository + attr_reader :public_repository + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @public_repository = args['publicRepository'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigMavenRepository" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository.rb new file mode 100644 index 000000000..c3d3c8a47 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigNpmRepository + attr_reader :public_repository + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @public_repository = args['publicRepository'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigNpmRepository" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository.rb new file mode 100644 index 000000000..7653e1f70 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigPythonRepository + attr_reader :public_repository + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @public_repository = args['publicRepository'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigPythonRepository" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials.rb new file mode 100644 index 000000000..4933f4063 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials' +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentials + attr_reader :username_password_credentials + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @username_password_credentials = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentials.new(args['usernamePasswordCredentials'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentials" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials.rb new file mode 100644 index 000000000..7fbf6dfea --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentials + attr_reader :username + + attr_reader :password_secret_version + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @username = args['username'] + @password_secret_version = args['passwordSecretVersion'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentials" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository.rb new file mode 100644 index 000000000..d3edc0e89 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository' +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigYumRepository + attr_reader :public_repository + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @public_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigYumRepositoryPublicRepository.new(args['publicRepository'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigYumRepository" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository.rb new file mode 100644 index 000000000..f92864b49 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryRemoteRepositoryConfigYumRepositoryPublicRepository + attr_reader :repository_base + + attr_reader :repository_path + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @repository_base = args['repositoryBase'] + @repository_path = args['repositoryPath'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryRemoteRepositoryConfigYumRepositoryPublicRepository" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config.rb b/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config.rb new file mode 100644 index 000000000..0cd605ec5 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies' +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryVirtualRepositoryConfig + attr_reader :upstream_policies + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @upstream_policies = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPoliciesArray.parse(args['upstreamPolicies'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryVirtualRepositoryConfig" + end + end + end + end +end diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies.rb b/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies.rb new file mode 100644 index 000000000..51f38d0c3 --- /dev/null +++ b/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Artifactregistry + module Property + class ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPolicies + attr_reader :id + + attr_reader :repository + + attr_reader :priority + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @id = args['id'] + @repository = args['repository'] + @priority = args['priority'] + end + + def to_s + "#{@parent_identifier} ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPolicies" + end + end + + class ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPoliciesArray + def self.parse(value, parent_identifier) + return if value.nil? + return ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPolicies.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPolicies.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google_artifactregistry_project_location_repositories.rb b/libraries/google_artifactregistry_project_location_repositories.rb new file mode 100644 index 000000000..80cdd679f --- /dev/null +++ b/libraries/google_artifactregistry_project_location_repositories.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'gcp_backend' +class ArtifactregistryProjectLocationRepositorys < GcpResourceBase + name 'google_artifactregistry_project_location_repositories' + desc 'ProjectLocationRepository plural resource' + supports platform: 'gcp' + + attr_reader :table + + filter_table_config = FilterTable.create + + filter_table_config.add(:maven_configs, field: :maven_config) + filter_table_config.add(:docker_configs, field: :docker_config) + filter_table_config.add(:virtual_repository_configs, field: :virtual_repository_config) + filter_table_config.add(:remote_repository_configs, field: :remote_repository_config) + filter_table_config.add(:names, field: :name) + filter_table_config.add(:formats, field: :format) + filter_table_config.add(:descriptions, field: :description) + filter_table_config.add(:labels, field: :labels) + filter_table_config.add(:create_times, field: :create_time) + filter_table_config.add(:update_times, field: :update_time) + filter_table_config.add(:kms_key_names, field: :kms_key_name) + filter_table_config.add(:modes, field: :mode) + filter_table_config.add(:cleanup_policies, field: :cleanup_policies) + filter_table_config.add(:size_bytes, field: :size_bytes) + filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) + filter_table_config.add(:cleanup_policy_dry_runs, field: :cleanup_policy_dry_run) + + filter_table_config.connect(self, :table) + + def initialize(params = {}) + super(params.merge({ use_http_transport: true })) + @params = params + @table = fetch_wrapped_resource('repositories') + end + + def fetch_wrapped_resource(wrap_path) + # fetch_resource returns an array of responses (to handle pagination) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + return if result.nil? + + # Conversion of string -> object hash to symbol -> object hash that InSpec needs + converted = [] + result.each do |response| + next if response.nil? || !response.key?(wrap_path) + response[wrap_path].each do |hash| + hash_with_symbols = {} + hash.each_key do |key| + name, value = transform(key, hash) + hash_with_symbols[name] = value + end + converted.push(hash_with_symbols) + end + end + + converted + end + + def transform(key, value) + return transformers[key].call(value) if transformers.key?(key) + + [key.to_sym, value] + end + + def transformers + { + 'mavenConfig' => ->(obj) { [:maven_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryMavenConfig.new(obj['mavenConfig'], to_s)] }, + 'dockerConfig' => ->(obj) { [:docker_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryDockerConfig.new(obj['dockerConfig'], to_s)] }, + 'virtualRepositoryConfig' => ->(obj) { [:virtual_repository_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfig.new(obj['virtualRepositoryConfig'], to_s)] }, + 'remoteRepositoryConfig' => ->(obj) { [:remote_repository_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfig.new(obj['remoteRepositoryConfig'], to_s)] }, + 'name' => ->(obj) { [:name, obj['name']] }, + 'format' => ->(obj) { [:format, obj['format']] }, + 'description' => ->(obj) { [:description, obj['description']] }, + 'labels' => ->(obj) { [:labels, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryLabels.new(obj['labels'], to_s)] }, + 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, + 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, + 'kmsKeyName' => ->(obj) { [:kms_key_name, obj['kmsKeyName']] }, + 'mode' => ->(obj) { [:mode, obj['mode']] }, + 'cleanupPolicies' => ->(obj) { [:cleanup_policies, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryCleanupPolicies.new(obj['cleanupPolicies'], to_s)] }, + 'sizeBytes' => ->(obj) { [:size_bytes, obj['sizeBytes']] }, + 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, + 'cleanupPolicyDryRun' => ->(obj) { [:cleanup_policy_dry_run, obj['cleanupPolicyDryRun']] }, + } + end + + private + + def product_url(_ = nil) + 'https://artifactregistry.googleapis.com/v1beta1/' + end + + def resource_base_url + '{{parent}}/repositories' + end +end diff --git a/libraries/google_artifactregistry_project_location_repository.rb b/libraries/google_artifactregistry_project_location_repository.rb new file mode 100644 index 000000000..cff85e08d --- /dev/null +++ b/libraries/google_artifactregistry_project_location_repository.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'gcp_backend' +require 'google/artifactregistry/property/projectlocationrepository_cleanup_policies' +require 'google/artifactregistry/property/projectlocationrepository_docker_config' +require 'google/artifactregistry/property/projectlocationrepository_labels' +require 'google/artifactregistry/property/projectlocationrepository_maven_config' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository' +require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository' +require 'google/artifactregistry/property/projectlocationrepository_virtual_repository_config' +require 'google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies' + +# A provider to manage Artifact Registry resources. +class ArtifactregistryProjectLocationRepository < GcpResourceBase + name 'google_artifactregistry_project_location_repository' + desc 'ProjectLocationRepository' + supports platform: 'gcp' + + attr_reader :params + attr_reader :maven_config + attr_reader :docker_config + attr_reader :virtual_repository_config + attr_reader :remote_repository_config + attr_reader :name + attr_reader :format + attr_reader :description + attr_reader :labels + attr_reader :create_time + attr_reader :update_time + attr_reader :kms_key_name + attr_reader :mode + attr_reader :cleanup_policies + attr_reader :size_bytes + attr_reader :satisfies_pzs + attr_reader :cleanup_policy_dry_run + + def initialize(params) + super(params.merge({ use_http_transport: true })) + @params = params + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + parse unless @fetched.nil? + end + + def parse + @maven_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryMavenConfig.new(@fetched['mavenConfig'], to_s) + @docker_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryDockerConfig.new(@fetched['dockerConfig'], to_s) + @virtual_repository_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfig.new(@fetched['virtualRepositoryConfig'], to_s) + @remote_repository_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfig.new(@fetched['remoteRepositoryConfig'], to_s) + @name = @fetched['name'] + @format = @fetched['format'] + @description = @fetched['description'] + @labels = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryLabels.new(@fetched['labels'], to_s) + @create_time = @fetched['createTime'] + @update_time = @fetched['updateTime'] + @kms_key_name = @fetched['kmsKeyName'] + @mode = @fetched['mode'] + @cleanup_policies = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryCleanupPolicies.new(@fetched['cleanupPolicies'], to_s) + @size_bytes = @fetched['sizeBytes'] + @satisfies_pzs = @fetched['satisfiesPzs'] + @cleanup_policy_dry_run = @fetched['cleanupPolicyDryRun'] + end + + def exists? + !@fetched.nil? + end + + def to_s + "ProjectLocationRepository #{@params[:name]}" + end + + private + + def product_url(_ = nil) + 'https://artifactregistry.googleapis.com/v1beta1/' + end + + def resource_base_url + '{{name}}' + end +end diff --git a/test/integration/build/gcp-mm.tf b/test/integration/build/gcp-mm.tf index 02e4b7abc..d7d8b16b1 100644 --- a/test/integration/build/gcp-mm.tf +++ b/test/integration/build/gcp-mm.tf @@ -216,6 +216,10 @@ variable "scheduler_job" { type = any } +variable "project_location_repository" { + type = any +} + variable "cloud_composer_v1" { type = any } @@ -1556,6 +1560,13 @@ resource "google_vertex_ai_index" "index" { index_update_method = "STREAM_UPDATE" } +resource "google_artifact_registry_repository" "example" { + project = var.project_location_repository.project_id + repository_id = var.project_location_repository.display_name + location = var.project_location_repository.location + format = var.project_location_repository.format +} + resource "google_composer_v1_environment" "test" { name = var.cloud_composer_v1["name"] region = var.cloud_composer_v1["region"] diff --git a/test/integration/configuration/mm-attributes.yml b/test/integration/configuration/mm-attributes.yml index 37074e018..28443ec16 100644 --- a/test/integration/configuration/mm-attributes.yml +++ b/test/integration/configuration/mm-attributes.yml @@ -558,6 +558,14 @@ dlp: location: "europe-west2" type: "Infotype" +project_location_repository: + name : "projects/ppradhan/locations/us-central1/repositories/test-repository-1" + parent : "projects/ppradhan/locations/us-central1" + display_name: "test-repository-1" + location: "us-central1" + format: "DOCKER" + project_id: "ppradhan" + cloud_composer_v1: name : "example-composer-env" region : "us-central1" diff --git a/test/integration/verify/controls/google_artifactregistry_project_location_repositories.rb b/test/integration/verify/controls/google_artifactregistry_project_location_repositories.rb new file mode 100644 index 000000000..baf5d71fd --- /dev/null +++ b/test/integration/verify/controls/google_artifactregistry_project_location_repositories.rb @@ -0,0 +1,31 @@ +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- + +title 'Test GCP google_artifactregistry_project_location_repositories resource.' + +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project identifier.') + +project_location_repository = input('project_location_repository', value: { + "name": "projects/#{gcp_project_id}/locations/#{gcp_location}/repositories/test-repository-1", + "parent": "projects/#{gcp_project_id}/locations/#{gcp_location}" +}, description: 'project_location_repository description') +control 'google_artifactregistry_project_location_repositories-1.0' do + impact 1.0 + title 'google_artifactregistry_project_location_repositories resource test' + + describe google_artifactregistry_project_location_repositories(parent: project_location_repository['parent']) do + it { should exist } + end +end diff --git a/test/integration/verify/controls/google_artifactregistry_project_location_repository.rb b/test/integration/verify/controls/google_artifactregistry_project_location_repository.rb new file mode 100644 index 000000000..b3e6956c6 --- /dev/null +++ b/test/integration/verify/controls/google_artifactregistry_project_location_repository.rb @@ -0,0 +1,35 @@ +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- + +title 'Test GCP google_artifactregistry_project_location_repository resource.' + +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: 'gcp_location', description: 'The GCP project identifier.') + +project_location_repository = input('project_location_repository', value: { + "name": "projects/#{gcp_project_id}/locations/#{gcp_location}/repositories/test-repository-1", + "parent": "projects/#{gcp_project_id}/locations/#{gcp_location}" +}, description: 'project_location_repository description') +control 'google_artifactregistry_project_location_repository-1.0' do + impact 1.0 + title 'google_artifactregistry_project_location_repository resource test' + + describe google_artifactregistry_project_location_repository(name: project_location_repository['name']) do + it { should exist } + end + + describe google_artifactregistry_project_location_repository(name: "does_not_exit") do + it { should_not exist } + end +end