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

provider/google: Support Import of 'google_compute_firewall' #8236

Merged
merged 1 commit into from
Aug 18, 2016

Conversation

nwwebb
Copy link
Contributor

@nwwebb nwwebb commented Aug 16, 2016

make testacc TEST=./builtin/providers/google TESTARGS='-run=TestAccComputeFirewall' 
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/google -v -run=TestAccComputeFirewall -timeout 120m
=== RUN   TestAccComputeFirewall_importBasic
--- PASS: TestAccComputeFirewall_importBasic (206.71s)
=== RUN   TestAccComputeFirewall_basic
--- PASS: TestAccComputeFirewall_basic (86.25s)
=== RUN   TestAccComputeFirewall_update
--- PASS: TestAccComputeFirewall_update (107.32s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/google
400.331s
make testacc TEST=./builtin/providers/google TESTARGS='-run=TestComputeFirewallMigrate' 
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/google -v -run=TestComputeFirewallMigrate -timeout 120m
=== RUN   TestComputeFirewallMigrateState
--- PASS: TestComputeFirewallMigrateState (0.00s)
=== RUN   TestComputeFirewallMigrateState_empty
--- PASS: TestComputeFirewallMigrateState_empty (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/google
0.058s

Read was not working for the ports attribute of allow. I tried to set it in the same way as other TypeSets (target_tags for example) and it seemed to not be working because it was nested within allow. I fixed this issue by changing ports to a TypeList. I added a state migration for changing ports from a TypeSet to TypeList so that existing states are not effected by this change.
@lwander

@lwander
Copy link
Contributor

lwander commented Aug 16, 2016

Looks like a unit test is failing for the migration

@@ -43,10 +47,9 @@ func resourceComputeFirewall() *schema.Resource {
},

"ports": &schema.Schema{
Type: schema.TypeSet,
Type: schema.TypeList,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain in the PR what motivated this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I edited the PR to explain the change

@nwwebb nwwebb force-pushed the import-firewall branch 2 times, most recently from 09a5aec to b3e435d Compare August 16, 2016 20:53
@ghost
Copy link

ghost commented Apr 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants