Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Commit

Permalink
Removed reference to mappers.go in add new resource docs (#286)
Browse files Browse the repository at this point in the history
This is outdated; the rest of the doc was already updated to point to mappers.go.erb in magic-modules instead
  • Loading branch information
melinath authored Aug 10, 2021
1 parent 7977bc8 commit f3f95a0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/contributing/add_new_resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ You can then run `make test` inside your terraform-google-conversion repository

### 2. Terraform Validator

1. Run `go get github.com/GoogleCloudPlatform/terraform-google-conversion` to update the version of terraform-google-conversion in use. (You can also use a [`replace` directive](https://golang.org/ref/mod#go-mod-file-replace) to use your local copy of the repository.)
2. Add a new entry to [mappers.go](../converters/google/mappers.go) for the new resource.
Run `go get github.com/GoogleCloudPlatform/terraform-google-conversion` to update the version of terraform-google-conversion in use. (You can also use a [`replace` directive](https://golang.org/ref/mod#go-mod-file-replace) to use your local copy of the repository.)

You can now build the binary (with `make build`) and test it. One way to do this would be to create a test project following the instructions in the [policy library user guide](https://github.com/forseti-security/policy-library/blob/master/docs/user_guide.md#for-local-development-environments) (but using the binary you just built.) It's easiest to use a [GCPAlwaysViolatesConstraintV1](https://github.com/GoogleCloudPlatform/terraform-validator/blob/master/testdata/sample_policies/always_violate/policies/constraints/always_violates.yaml) constraint for testing new resources; this is what the tests do. `terraform-validator convert tfplan.json` can show you what terraform-validator thinks the converted Asset looks like.

Expand Down

0 comments on commit f3f95a0

Please sign in to comment.