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
1 change: 1 addition & 0 deletions mmv1/products/dataplex/Entry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ examples:
test_env_vars:
project_number: 'PROJECT_NUMBER'
project_id: 'PROJECT_NAME'
external_providers: ["time"]


parameters:
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/dataplex/EntryLink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
EntryLink represents a link between two Entries.
references:
guides:
'Official Documentation': 'https://cloud.google.com/dataplex/docs' # Update with specific EntryLink docs when available

Check warning on line 20 in mmv1/products/dataplex/EntryLink.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

20:72 [comments] too few spaces before comment
api: 'https://cloud.google.com/dataplex/docs/reference/rest/v1/projects.locations.entryGroups.entryLinks'
docs:
base_url: 'projects/{{project}}/locations/{{location}}/entryGroups/{{entry_group_id}}/entryLinks/{{entry_link_id}}'
Expand All @@ -42,6 +42,7 @@
entry_link_name: 'my_entry_link_full'
test_env_vars:
project_number: 'PROJECT_NUMBER'
external_providers: ["time"]
parameters:
- name: 'entryGroupId'
type: String
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/dataplex/GlossaryTerm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'GlossaryTerm'

Check warning on line 14 in mmv1/products/dataplex/GlossaryTerm.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

14:1 [document-start] missing document start "---"
description: |
Represents a collection of terms within a Glossary that are related to each other.
base_url: 'projects/{{project}}/locations/{{location}}/glossaries/{{glossary_id}}/terms/{{term_id}}'
Expand All @@ -34,6 +34,7 @@
primary_resource_id: 'term_test_id_full'
vars:
term_name: 'term-full'
external_providers: ["time"]
parameters:
- name: 'location'
type: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ resource "google_dataplex_glossary_term" "example-glossary-term" {
term_id = "{{index $.Vars "glossary_term_id"}}"
}

# Introduce a 45-second wait after the glossary resource creation
resource "time_sleep" "wait-for-sync" {
create_duration = "45s"
depends_on = [google_dataplex_glossary_term.example-glossary-term]
}

resource "google_dataplex_entry" "{{$.PrimaryResourceId}}" {
entry_group_id = "@dataplex"
project = "{{index $.TestEnvVars "project_number"}}"
Expand All @@ -26,5 +32,5 @@ resource "google_dataplex_entry" "{{$.PrimaryResourceId}}" {
EOF
}
}
depends_on = [google_dataplex_glossary_term.example-glossary-term]
depends_on = [time_sleep.wait-for-sync]
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ resource "google_dataplex_glossary_term" "term_test_id_full" {
display_name = "terraform term"
description = "term created by Terraform"
}

# Introduce a 45-second wait after the glossary resource creation
resource "time_sleep" "wait-for-sync" {
create_duration = "45s"
depends_on = [google_dataplex_glossary_term.term_test_id_full]
}

resource "google_dataplex_entry_link" "full_entry_link" {
project = "{{index $.TestEnvVars "project_number"}}"
location = "us-central1"
Expand All @@ -43,5 +50,5 @@ resource "google_dataplex_entry_link" "full_entry_link" {
name = "projects/${google_dataplex_entry_group.entry-group-full.project}/locations/us-central1/entryGroups/@dataplex/entries/projects/${google_dataplex_entry_group.entry-group-full.project}/locations/us-central1/glossaries/${google_dataplex_glossary.term_test_id_full.glossary_id}/terms/${google_dataplex_glossary_term.term_test_id_full.term_id}"
type = "TARGET"
}
depends_on = [google_dataplex_glossary_term.term_test_id_full]
depends_on = [time_sleep.wait-for-sync]
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ func TestAccDataplexEntryLink_update(t *testing.T) {
acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
ExternalProviders: map[string]resource.ExternalProvider{
"time": {},
},
Steps: []resource.TestStep{
{
Config: testAccDataplexEntryLink_dataplexEntryLinkUpdate(context),
Expand Down Expand Up @@ -66,6 +69,11 @@ resource "google_dataplex_glossary_term" "term_test_id_full" {
display_name = "terraform term"
description = "term created by Terraform"
}
# Introduce a 45-second wait after the glossary resource creation
resource "time_sleep" "wait-for-sync" {
create_duration = "45s"
depends_on = [google_dataplex_glossary_term.term_test_id_full]
}
resource "google_dataplex_entry_link" "basic_entry_link" {
project = "%{project_number}"
location = "us-central1"
Expand All @@ -80,7 +88,7 @@ resource "google_dataplex_entry_link" "basic_entry_link" {
name = "projects/${google_dataplex_entry_group.entry-group-basic.project}/locations/us-central1/entryGroups/@dataplex/entries/projects/${google_dataplex_entry_group.entry-group-basic.project}/locations/us-central1/glossaries/${google_dataplex_glossary.term_test_id_full.glossary_id}/terms/${google_dataplex_glossary_term.term_test_id_full.term_id}"
type = "TARGET"
}
depends_on = [google_dataplex_glossary_term.term_test_id_full]
depends_on = [time_sleep.wait-for-sync]
}
`, context)
}
Loading