Florian Forster
97e1aa7ce9
backend/remote-state/gcloud: Use the lock file's generation as lock ID.
...
This allows Unlock() to call Delete() without reading the lock file's
content first.
2017-10-27 16:51:21 -04:00
Florian Forster
edf2096e28
backend/remote-state/gcloud: Use the context provided to configure().
...
Calling context.Background() from outside the main() function is
discouraged. The configure functions are only called from
"…/helper/schema".Backend.Configure which provides the Background context,
i.e. a long-living context we can use for backend communication.
2017-10-27 16:51:21 -04:00
Florian Forster
2e5fca78c2
backend/remote-state/gcloud: Coding style changes.
...
Refactorings to make the code more idiomatic.
2017-10-27 16:51:21 -04:00
Florian Forster
f33005faba
backend/remote-state/gcloud: Handle errors returned by Write(), too.
...
Many GCS errors are returned by Close(), but not all.
2017-10-27 16:51:21 -04:00
Florian Forster
1ee194986d
backend/remote-state/gcloud: Add the RemoteClient.{state,lock}File() methods.
2017-10-27 16:51:20 -04:00
Florian Forster
e54d36b489
backend/remote-state/gcloud: Sort standard library imports before other imports.
2017-10-27 16:51:20 -04:00
Florian Forster
52ac764036
backend/remote-state/gcloud: Rename Url -> URL
2017-10-27 16:51:20 -04:00
Florian Forster
5313e15e07
backend/remote-state/gcloud: Move the definition of the Backend struct.
2017-10-27 16:51:20 -04:00
Florian Forster
def3279ec7
backend/remote-state/gcloud: Use package provided OAuth scope.
2017-10-27 16:51:20 -04:00
Piotrek Bzdyl
5854373018
Implemented GCloud backend supporting remote locking and multiple workspaces.
2017-10-27 16:51:20 -04:00