Skip to content

Commit

Permalink
remove creation of dynamodb table for project
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Vlasic committed Aug 25, 2021
1 parent 3d45d9d commit d3a7f6f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
18 changes: 0 additions & 18 deletions internal/assets/terraform/templates/project.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,6 @@ module "funcs" {
}
}

module "dynamodb" {
source = "http://localhost:8080/terraform/modules/dynamodb.zip"
name = local.table_name
}

# expose aws region and profile for use in shell scripts
output "aws_region" {
value = local.aws_region
}

output "aws_profile" {
value = local.aws_profile
}

output "url" {
value = module.funcs.url
}
Expand All @@ -81,7 +67,3 @@ output "functions" {
output "functions_bucket" {
value = local.project_bucket
}

output "dynamodb_table" {
value = module.dynamodb.table_name
}
18 changes: 0 additions & 18 deletions internal/mantil/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const (
const (
envProjectName = "MANTIL_PROJECT_NAME"
envStageName = "MANTIL_STAGE_NAME"
envKVTableName = "MANTIL_KV_TABLE_NAME"
)

type Project struct {
Expand All @@ -28,7 +27,6 @@ type Project struct {
Token string
ApiURL string
Functions []Function
Table Table
}

type Function struct {
Expand Down Expand Up @@ -56,10 +54,6 @@ type FunctionUpdate struct {
Removed bool
}

type Table struct {
Name string
}

func TryOrganization() Organization {
return Organization{
Name: "try",
Expand All @@ -82,23 +76,12 @@ func ProjectBucket(projectName string) string {
return ProjectIdentifier(projectName)
}

func KVTableName(projectName string) string {
return fmt.Sprintf("%s-%s-kv", projectName, defaultStage)
}

func ProjectTable(projectName string) Table {
return Table{
Name: KVTableName(projectName),
}
}

func NewProject(name, token string) (*Project, error) {
org := TryOrganization()
p := &Project{
Organization: org,
Name: name,
Bucket: ProjectBucket(name),
Table: ProjectTable(name),
Token: token,
}
return p, nil
Expand Down Expand Up @@ -175,7 +158,6 @@ func (p *Project) AddFunctionDefaults() {
}
f.Env[envProjectName] = p.Name
f.Env[envStageName] = defaultStage
f.Env[envKVTableName] = KVTableName(p.Name)
p.Functions[i] = f
}
}
Expand Down

0 comments on commit d3a7f6f

Please sign in to comment.