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

Google Cloud: PubSub Topic and Subscription resources #3671

Merged
merged 1 commit into from
Dec 2, 2015

Conversation

coffeepac
Copy link
Contributor

create the topics and subscriptions resources.

@apparentlymart apparentlymart changed the title golang pubsub SDK has been released. Google Cloud: PubSub Topic and Subscription resources Oct 28, 2015
@lwander
Copy link
Contributor

lwander commented Oct 30, 2015

Looks good! Although, you're missing the push_config block shown here under the subscriptions resource.

Could you make the relevant updates to the documentation here and here?

Thanks for doing this!

@sparkprime
Copy link
Contributor

All the other resources are prefixed by the name of the API that creates them, so instance becomes compute_instance and so on. Here, if you could use google_pubsub_topic and so on, that would be more consistent.

@coffeepac
Copy link
Contributor Author

@lwander I haven't used the push_config guff and wasn't entirely sure how to test it. I'll take a look at it later tonight

@sparkprime I was tempted to pull the PR and redo so I'll make that change tonight as well.

@coffeepac
Copy link
Contributor Author

@lwander the push config section is a bit beyond what I'm up to right now. if I have time at the end of my current project I'll add it but odds are someone else will need it first. documentation has been updated as well

@sparkprime resources/tests renamed to include pubsub hiearchy section

@lwander
Copy link
Contributor

lwander commented Nov 3, 2015

@coffeepac, in that case, are you OK if I pick up where you left off?

@coffeepac
Copy link
Contributor Author

@lwander have at it my friend. Need me to do anything for that? First time passing off a PR on a project that isn't mine/internal.

@lwander
Copy link
Contributor

lwander commented Nov 3, 2015

@coffeepac, I think we need someone with commit privileges to turn this into a branch so you'll get credit for starting this off. Maybe @sparkprime could help?

@sparkprime
Copy link
Contributor

This PR seems to also include some aws changes

@coffeepac
Copy link
Contributor Author

yeah, looks like a bad/weird rebase. those shouldn't be there. I will sort that out tonight. my apologies.

@coffeepac
Copy link
Contributor Author

@sparkprime @lwander okay! sorted out the funky rebase, I have no idea what I did but a little rebase back onto upstream/master and sanity returns. thanks git!

@sparkprime
Copy link
Contributor

@lwander Shall I merge this and then you can do another PR to add whatever else, or are you planning on changing it in backwards-incompatible ways? In which case I won't do that :)

@lwander
Copy link
Contributor

lwander commented Nov 10, 2015

That sounds best

ForceNew: true,
},

"topic_computed": &schema.Schema{
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't look like this is documented and I don't see what use it can be. Can we remove it before merging this 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.

topic_computed is the canonical name of the topic that is required by the API for creating the subscription.

however, it is already being computed from the name schema value. I'll remove it shortly.

@coffeepac
Copy link
Contributor Author

@sparkprime change made and build fixed. ready for launch.

@sparkprime
Copy link
Contributor

Thanks, I'll merge when the current release freeze ends :)

@coffeepac
Copy link
Contributor Author

Hooray! Thanks buddy!
On Nov 23, 2015 2:17 PM, "Dave Cunningham" notifications@github.com wrote:

Thanks, I'll merge when the current release freeze ends :)


Reply to this email directly or view it on GitHub
#3671 (comment).

@coffeepac
Copy link
Contributor Author

@lwander @sparkprime my apologies for changing this after you had accepted it, but turns out I needed the ackDeadlineSeconds config param and while I was in there I added the pushConfig sections.

and a question: when is the code freeze until? thanks!

@sparkprime
Copy link
Contributor

Sorry, it's actually been several days since the freeze ended but I had a bunch of other stuff going on as well as the Thanksgiving holidays and it slipped my mind.

Thanks for adding the extra stuff!

There's one general problem and that's that we tend to keep as close as possible to the Google APIs, which means that the push config stuff ought to be in a nested sub-block "push_config" with "push_endpoint" and "attributes" underneath it. The way this is done in Terraform right now is to use a list of 1 element to represent the block, and raise an error if the list is > 1 elements. There is an example here with the 'website' field: https://github.com/hashicorp/terraform/blob/master/builtin/providers/google/resource_storage_bucket.go

I can't merge this now as if I were to do that and we were then to change it, the change would not be backwards-compatible. However if you were to make that simple change to add the block, you would be the undisputed hero of Terraform Google pub/sub :)

@coffeepac
Copy link
Contributor Author

Well, I do love being a hero...

On Tue, Dec 1, 2015 at 10:58 PM, Dave Cunningham notifications@github.com
wrote:

Sorry, it's actually been several days since the freeze ended but I had a
bunch of other stuff going on as well as the Thanksgiving holidays and it
slipped my mind.

Thanks for adding the extra stuff!

There's one general problem and that's that we tend to keep as close as
possible to the Google APIs, which means that the push config stuff ought
to be in a nested sub-block "push_config" with "push_endpoint" and
"attributes" underneath it. The way this is done in Terraform right now is
to use a list of 1 element to represent the block, and raise an error if
the list is > 1 elements. There is an example here with the 'website'
field:
https://github.com/hashicorp/terraform/blob/master/builtin/providers/google/resource_storage_bucket.go

I can't merge this now as if I were to do that and we were then to change
it, the change would not be backwards-compatible. However if you were to
make that simple change to add the block, you would be the undisputed hero
of Terraform Google pub/sub :)


Reply to this email directly or view it on GitHub
#3671 (comment).

@coffeepac
Copy link
Contributor Author

@sparkprime I believe I have addressed your last two comments. thanks for your quick response once already!

@sparkprime
Copy link
Contributor

Nice one! You're not going to believe this but there's another release freeze #4133

But I'll definitely merge it when that's over.

@sparkprime
Copy link
Contributor

Freeze is over, but can I ask you to squash your commits. Last thing, I promise :)

…e that

Conflicts:
	builtin/providers/google/provider.go
	builtin/providers/google/resource_subscription.go
	builtin/providers/google/resource_subscription_test.go

golang pubsub SDK has been released.  moved topics/subscriptions to use that

Conflicts:
	builtin/providers/google/provider.go
	builtin/providers/google/resource_subscription.go
	builtin/providers/google/resource_subscription_test.go

file renames and add documentation files

remove typo'd merge and type file move

add to index page as well

only need to define that once

remove topic_computed schema value

I think this was used at one point but is no longer. away.

cleanup typo

adds a couple more config values

- ackDeadlineSeconds: number of seconds to wait for an ack
- pushAttributes: attributes of a push subscription
- pushEndpoint: target for a push subscription

rearrange to better match current conventions

respond to all of the comments
@coffeepac
Copy link
Contributor Author

@sparkprime looks like we're good to go with that squash. can you take a quick look and make sure i didn't miss anything?

sparkprime added a commit that referenced this pull request Dec 2, 2015
Google Cloud: PubSub Topic and Subscription resources
@sparkprime sparkprime merged commit d6ae527 into hashicorp:master Dec 2, 2015
@lwander
Copy link
Contributor

lwander commented Dec 2, 2015

🎊 🎊 🎊

Thank you @coffeepac!

@coffeepac
Copy link
Contributor Author

Glad to help! Now to find the time to finish the bigquery PR 😃

@ghost
Copy link

ghost commented Apr 29, 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 29, 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.

4 participants