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

feat: implement provider gateway vlan assignment #3558

Merged
merged 4 commits into from
Feb 11, 2022

Conversation

robgolley
Copy link
Contributor

@robgolley robgolley commented Feb 7, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Implement the following changes for Direct Link Provider Gateways

  • Allow the user to specify the desired VLAN on gateway create and update.

Output from acceptance testing:

$ make testacc TEST=./ibm/service/directlink TESTARGS='-run=TestAccIBMDLProviderGWsDataSource_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/directlink -v -run=TestAccIBMDLProviderGWsDataSource_basic -timeout 700m
"
"
=== RUN   TestAccIBMDLProviderGWsDataSource_basic
--- PASS: TestAccIBMDLProviderGWsDataSource_basic (23.15s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/directlink	24.365s
$ make testacc TEST=./ibm/service/directlink TESTARGS='-run=TestAccIBMDLProviderGateway_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/directlink -v -run=TestAccIBMDLProviderGateway_basic -timeout 700m
"
"
=== RUN   TestAccIBMDLProviderGateway_basic
--- PASS: TestAccIBMDLProviderGateway_basic (41.68s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/directlink	42.555s

@robgolley robgolley changed the title feat: implement provider tgw vlan assignment feat: implement provider gateway vlan assignment Feb 7, 2022
@@ -111,7 +110,7 @@ func ResourceIBMDLProviderGateway() *schema.Resource {
},
dlVlan: {
Type: schema.TypeInt,
Computed: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

If vlan is not provided will we have computed value for it...? If yes then it shd be optional+computed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, if omitted then the backend will compute the value. I have restored the Computed option.

@@ -36,6 +37,7 @@ Review the argument reference that you can specify for your resource.
- `name` - (Required, String) The unique user-defined name for this gateway. Example: `myGateway`.
- `port` - (Required, Forces new resource, String) The gateway port for type to connect gateway.
- `speed_mbps`- (Required, Integer) The gateway speed in megabits per second. For example, `10.254.30.78/30`.
- `vlan` - (Integer) VLAN requested for this gateway.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add Optional also along with Integer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Optional tag has been added.

@hkantare hkantare merged commit 4f77056 into IBM-Cloud:master Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants