Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data source for apphub discovered service #10105

Merged
merged 24 commits into from
Mar 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ddf5857
Add data source for apphub discovered service
gurankitt Mar 4, 2024
67b35df
Add data source for apphub discovered service'
gurankitt Mar 4, 2024
c1d55e9
Add data source for apphub discovered service
gurankitt Mar 4, 2024
a9a8103
resolved comments
gurankitt Mar 6, 2024
f3f5e02
retry logic added
gurankitt Mar 6, 2024
361919f
add tests and documentation
gurankitt Mar 7, 2024
bcaf67d
Corrected tests and added project field in the data source
gurankitt Mar 8, 2024
a8d409f
changed id field
gurankitt Mar 8, 2024
607e5df
Added random_suffix for the resources created and enabled iam policy …
gurankitt Mar 8, 2024
671b017
modified retry logic
gurankitt Mar 8, 2024
9284d56
Modified schema for the data source, and tests
gurankitt Mar 8, 2024
4239f4f
Removed IAM permission blocks
gurankitt Mar 8, 2024
9c075da
Add dependency for compute api
gurankitt Mar 8, 2024
b61d3e5
Merge branch 'GoogleCloudPlatform:main' into datasource
gurankitt Mar 8, 2024
86b1a6b
Resolve merge conflict
gurankitt Mar 8, 2024
9f2d90e
Add time sleep
gurankitt Mar 11, 2024
6d0ca32
Modified test function name
gurankitt Mar 11, 2024
7102010
Shorten service project name
gurankitt Mar 11, 2024
e4c5f15
Add billing account
gurankitt Mar 11, 2024
1325323
corrected get env variable function call
gurankitt Mar 11, 2024
afbdf9a
Modified project id
gurankitt Mar 11, 2024
a2a9cd1
Combined time delay
gurankitt Mar 11, 2024
9c7c92e
Resolving comments
gurankitt Mar 11, 2024
a5d541b
Remove retry logic and add time sleep for resource ingestion
gurankitt Mar 12, 2024
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
Prev Previous commit
Next Next commit
Add billing account
  • Loading branch information
gurankitt committed Mar 11, 2024
commit e4c5f157cc13632789cc506f4acf53c8297566f2
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ func TestAccDataSourceApphubDiscoveredService_basic(t *testing.T) {
t.Parallel()

context := map[string]interface{}{
"org_id": envvar.GetTestOrgFromEnv(t),
"random_suffix": acctest.RandString(t, 10),
"org_id": envvar.GetTestOrgFromEnv(t),
"random_suffix": acctest.RandString(t, 10),
"billing_account": envvar.GetBillingAccountFromEnv(t),
}

acctest.VcrTest(t, resource.TestCase{
Expand All @@ -37,6 +38,7 @@ resource "google_project" "service_project" {
project_id ="apphub-sp-%{random_suffix}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to start with tf-test so that it gets swept. If you're hitting the length limit, maybe just use tf-test-ah%{random_suffix}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

name = "Service Project"
org_id = "%{org_id}"
billing_account = "%{billing_account}"
}

resource "time_sleep" "wait_120s_for_service_project" {
Expand Down