Sha256: 157e3de3f50fcca39b863a2f7164bc42b92fb342737adf53b4ef70682f4977e5
Contents?: true
Size: 1.39 KB
Versions: 2
Compression:
Stored size: 1.39 KB
Contents
module Terraforming module Resource class EFSFileSystem include Terraforming::Util def self.tf(client: Aws::EFS::Client.new) self.new(client).tf end def self.tfstate(client: Aws::EFS::Client.new) self.new(client).tfstate end def initialize(client) @client = client end def tf apply_template(@client, "tf/elastic_file_system") end def tfstate file_systems.inject({}) do |resources, efs| attributes = { "creation_token" => efs.creation_token, "id" => efs.file_system_id, "performance_mode" => efs.performance_mode, "tags.%" => "1", "tags.Name" => efs.name, } resources["aws_efs_file_system.#{module_name_of(efs)}"] = { "type" => "aws_efs_file_system", "depends_on" => [], "primary" => { "id" => efs.file_system_id, "attributes" => attributes, "meta" => {}, "tainted" => false, }, "deposed" => [], "provider" => "aws", } resources end end private def file_systems @client.describe_file_systems.data.file_systems.flatten end def module_name_of(efs) normalize_module_name(efs.file_system_id) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
terraforming-0.18.0 | lib/terraforming/resource/efs_file_system.rb |
terraforming-0.17.0 | lib/terraforming/resource/efs_file_system.rb |