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 resource_logging_billing_account_sink resource #457

Merged
merged 2 commits into from
Sep 26, 2017

Conversation

selmanj
Copy link
Contributor

@selmanj selmanj commented Sep 25, 2017

This adds support for resource_logging_billing_account_sink; the API looks identical to the one used for project-level sinks, so I opted to do some refactoring here to establish a common schema (there is also organizations and folder-level sinks coming soon).

@rosbo rosbo self-requested a review September 25, 2017 22:22
Copy link
Contributor

@rosbo rosbo left a comment

Choose a reason for hiding this comment

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

Good job on the refactoring to reuse code common across sinks. Out of curiosity, how many other sinks do we have to support?

Read: resourceLoggingBillingAccountSinkRead,
Delete: resourceLoggingBillingAccountSinkDelete,
Update: resourceLoggingBillingAccountSinkUpdate,
Schema: resourceLoggingSinkSchema(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Import support? You have all the context you need fresh in your mind. Since this PR is long, I think it is a good idea to do it in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed! I actually started adding that but stopped as it got pretty complicated. My approach was modeled on yours


* `name` - (Required) The name of the logging sink.

* 'billing_account' - (Required) The billing account exported to the sink.
Copy link
Contributor

Choose a reason for hiding this comment

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

use the same quote style: `` not '

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, fixed

}

func expandResourceloggingSinkForUpdate(d *schema.ResourceData) *logging.LogSink {
// Can only update destination/filter right now. Despite the method below using 'Patch', the API requires both
Copy link
Contributor

Choose a reason for hiding this comment

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

Capital L for logging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, fixed

@selmanj selmanj requested a review from rosbo September 26, 2017 16:59
@selmanj selmanj merged commit 8231d6a into hashicorp:master Sep 26, 2017
negz pushed a commit to negz/terraform-provider-google that referenced this pull request Oct 17, 2017
* Add resource_logging_billing_account_sink resource

* Fix bad style
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
* Add resource_logging_billing_account_sink resource

* Fix bad style
@ghost
Copy link

ghost commented Mar 30, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 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.

2 participants