Last active
February 11, 2016 20:30
-
-
Save LusciousPear/67d79c4b16fc6327935c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import( | |
"google.golang.org/api/appengine/v1beta4" | |
) | |
deployment := &appengine.Deployment{Files:files} | |
handlers := urlHandlers() | |
inbound_services := make([]string, 1) | |
inbound_services[0] = "INBOUND_SERVICE_WARMUP" | |
env_vars := make(map[string]string,2) | |
env_vars["OUTPUTPUBSUB"] = d.Get("topicName").(string) | |
env_vars["RETURNMESSAGEIDS"] = "true" | |
// Version object for this module | |
version := &appengine.Version{ | |
AutomaticScaling: automaticScaling, | |
Deployment:deployment, | |
Handlers: handlers, | |
Id: d.Get("version").(string), | |
Runtime: "java7", | |
//InstanceClass: "F2", this is exploding. not sure why | |
InboundServices: inbound_services, | |
EnvVariables: env_vars, | |
Threadsafe: true, | |
} | |
// create the application | |
moduleVersionService := appengine.NewAppsModulesVersionsService(config.clientAppengine) | |
createCall := moduleVersionService.Create(config.Project, d.Get("moduleName").(string), version) | |
operation, err := createCall.Do() | |
if err != nil { | |
return fmt.Errorf("failed to create mod ver: " + err.Error()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment