Skip to content

Commit

Permalink
define resource
Browse files Browse the repository at this point in the history
  • Loading branch information
digicosmos86 committed Jul 18, 2024
1 parent 00755e0 commit c7f5bb5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ code by adding a `module` configuration and setting its `source` parameter to UR

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | 5.38.0 |
No providers.

## Modules

Expand All @@ -55,9 +53,7 @@ code by adding a `module` configuration and setting its `source` parameter to UR

## Resources

| Name | Type |
|------|------|
| [google_project.project](https://registry.terraform.io/providers/hashicorp/google/5.38.0/docs/resources/project) | resource |
No resources.

## Inputs

Expand Down
7 changes: 0 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ module "project" {
labels = var.labels
}

resource "google_project" "project" {
project_id = module.project.project_id
name = module.project.project_name
org_id = var.org_id
}


# -----------------------------
# iam permissions
# -----------------------------
Expand Down
6 changes: 5 additions & 1 deletion tests/simple_project.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ run "simple_project_test" {
}

assert {
condition = google_project.project.lifecycle_state == "ACTIVE"
condition = module.simple-project.name == "inspect-project"
}

assert {
condition = module.simple-project.lifecycle_state == "ACTIVE"
error_message = "Project is not active"
}

Expand Down

0 comments on commit c7f5bb5

Please sign in to comment.